Skip to content

Commit

Permalink
Merge pull request #23 from coocood/log
Browse files Browse the repository at this point in the history
tweak log
  • Loading branch information
ngaut authored Jul 2, 2018
2 parents c1fefd7 + 9728b69 commit e3fc3f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,14 +724,13 @@ func (db *DB) ensureRoomForWrite() error {
y.AssertTrue(db.mt != nil) // A nil mt indicates that DB is being closed.
select {
case db.flushChan <- flushTask{db.mt, db.vptr}:
log.Infof("Flushing value log to disk if async mode.")
// Ensure value log is synced to disk so this memtable's contents wouldn't be lost.
err = db.vlog.sync()
if err != nil {
return err
}

log.Infof("Flushing memtable, mt.size=%d size of flushChan: %d\n",
log.Infof("Flushing memtable, mt.size=%d, size of flushChan: %d\n",
db.mt.MemSize(), len(db.flushChan))
// We manage to push this task. Let's modify imm.
db.imm = append(db.imm, db.mt)
Expand Down

0 comments on commit e3fc3f6

Please sign in to comment.