aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2018-05-22 16:12:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-05-22 16:12:52 +0800
commit6ce21a4744461fc35c05b1c5fcc92136761be747 (patch)
treefbb248c69b21976a5e492ee7ec9805bd96d92322 /vendor/github.com/syndtr/goleveldb/leveldb/db_write.go
parent9af364e42b2fbbacf2febf9c43068ddb8a058b79 (diff)
downloadgo-tangerine-6ce21a4744461fc35c05b1c5fcc92136761be747.tar
go-tangerine-6ce21a4744461fc35c05b1c5fcc92136761be747.tar.gz
go-tangerine-6ce21a4744461fc35c05b1c5fcc92136761be747.tar.bz2
go-tangerine-6ce21a4744461fc35c05b1c5fcc92136761be747.tar.lz
go-tangerine-6ce21a4744461fc35c05b1c5fcc92136761be747.tar.xz
go-tangerine-6ce21a4744461fc35c05b1c5fcc92136761be747.tar.zst
go-tangerine-6ce21a4744461fc35c05b1c5fcc92136761be747.zip
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
Diffstat (limited to 'vendor/github.com/syndtr/goleveldb/leveldb/db_write.go')
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db_write.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go
index 31f4bc5ef..db0c1bece 100644
--- a/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go
@@ -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
}