vendor, ethdb: print warning log if leveldb is performing compaction (#16766)

* vendor: update leveldb package

* ethdb: print warning log if db is performing compaction

* ethdb: update annotation and log
This commit is contained in:
gary rong
2018-05-22 16:12:52 +08:00
committed by Péter Szilágyi
parent 9af364e42b
commit 6ce21a4744
4 changed files with 90 additions and 5 deletions

View File

@ -89,7 +89,11 @@ func (db *DB) flush(n int) (mdb *memDB, mdbFree int, err error) {
return false
case tLen >= pauseTrigger:
delayed = true
// Set the write paused flag explicitly.
atomic.StoreInt32(&db.inWritePaused, 1)
err = db.compTriggerWait(db.tcompCmdC)
// Unset the write paused flag.
atomic.StoreInt32(&db.inWritePaused, 0)
if err != nil {
return false
}