mirror of
https://github.com/taigrr/bitcask
synced 2025-01-18 04:03:17 -08:00
Refactor Datafile.Size()
This commit is contained in:
@@ -98,10 +98,10 @@ func (df *Datafile) Sync() error {
|
||||
return df.w.Sync()
|
||||
}
|
||||
|
||||
func (df *Datafile) Size() (int64, error) {
|
||||
func (df *Datafile) Size() int64 {
|
||||
df.RLock()
|
||||
defer df.RUnlock()
|
||||
return df.offset, nil
|
||||
return df.offset
|
||||
}
|
||||
|
||||
func (df *Datafile) Read() (e pb.Entry, err error) {
|
||||
|
||||
Reference in New Issue
Block a user