Skip to content

Commit

Permalink
Fix data duplicate writing (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
hailin0 committed Jul 19, 2023
1 parent 056624a commit c001e15
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Release Notes.
- BanyanDB ui type error
- Fix timer not released
- BanyanDB ui misses fields when creating a group
- Fix data duplicate writing

### Chores

Expand Down
1 change: 1 addition & 0 deletions banyand/measure/tstable.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func (t *tsTable) Get(key []byte, ts time.Time) ([]byte, error) {
func (t *tsTable) Put(key []byte, val []byte, ts time.Time) error {
if t.encoderBuffer != nil {
t.writeToBuffer(key, val, ts)
return nil
}
if err := t.openBuffer(); err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions banyand/stream/tstable.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (t *tsTable) Get(key []byte, ts time.Time) ([]byte, error) {
func (t *tsTable) Put(key []byte, val []byte, ts time.Time) error {
if t.buffer != nil {
t.buffer.Write(key, val, ts)
return nil
}

if err := t.openBuffer(); err != nil {
Expand Down

0 comments on commit c001e15

Please sign in to comment.