1
0
mirror of https://github.com/taigrr/bitcask synced 2025-01-18 04:03:17 -08:00

Fixed missing error handling opening new Datafile(s) during Put() Fixes #4

This commit is contained in:
James Mills 2019-03-17 13:47:07 +10:00
parent 67ab944db7
commit e83608b903
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6

View File

@ -132,6 +132,10 @@ func (b *Bitcask) put(key string, value []byte) (int64, error) {
}
df, err := NewDatafile(b.path, b.curr.id, true)
if err != nil {
return -1, err
}
b.datafiles = append(b.datafiles, df)
id := b.curr.id + 1