Skip to content

Commit

Permalink
Merge pull request weaviate#4893 from weaviate/fix_prevent_empty_segm…
Browse files Browse the repository at this point in the history
…ents

fix prevent empty segment generation
  • Loading branch information
jeroiraz authored May 9, 2024
2 parents 8f7f276 + 4b5b5e9 commit 51dcc38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions adapters/repos/db/lsmkv/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,11 @@ func (b *Bucket) atomicallyAddDiskSegmentAndRemoveFlushing() error {
b.flushLock.Lock()
defer b.flushLock.Unlock()

if b.flushing.Size() == 0 {
b.flushing = nil
return nil
}

path := b.flushing.path
if err := b.disk.add(path + ".db"); err != nil {
return err
Expand Down

0 comments on commit 51dcc38

Please sign in to comment.