Skip to content

Commit

Permalink
Fix files deleted from branch after commit with no deletes (#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-har authored Jan 18, 2021
1 parent f1ef76f commit 674d318
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions graveler/sstable/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ func (dw *DiskWriter) WriteRecord(record committed.Record) error {

// updating stats
if dw.count == 0 {
dw.first = record.Key
dw.first = make(committed.Key, len(record.Key))
copy(dw.first, record.Key)
}
dw.last = record.Key
dw.last = make(committed.Key, len(record.Key))
copy(dw.last, record.Key)
dw.count++

if err := dw.writeHashWithLen(record.Key); err != nil {
Expand Down

0 comments on commit 674d318

Please sign in to comment.