Skip to content

Commit

Permalink
fix: update committed flag after batch commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rfyiamcool committed Jun 14, 2023
1 parent 67e7a9c commit 19383b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"sync"

"github.com/bwmarrin/snowflake"

"github.com/rosedblabs/wal"
)

Expand Down Expand Up @@ -202,6 +203,7 @@ func (b *Batch) Commit() error {

batchId := b.batchId.Generate()
positions := make(map[string]*wal.ChunkPosition)

// write to wal
for _, record := range b.pendingWrites {
record.BatchId = uint64(batchId)
Expand Down Expand Up @@ -238,5 +240,6 @@ func (b *Batch) Commit() error {
}
}

b.committed = true
return nil
}
Binary file added rosedb-server
Binary file not shown.

0 comments on commit 19383b5

Please sign in to comment.