mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm/storage/localstore: update writeGCSizeWorker comment
This commit is contained in:
parent
bca85efff9
commit
cee4004dff
1 changed files with 5 additions and 4 deletions
|
|
@ -140,10 +140,11 @@ func (db *DB) incGCSize(count int64) {
|
|||
|
||||
var writeGCSizeDelay = 10 * time.Second
|
||||
|
||||
// writeGCSizeWorker calls writeGCSize function
|
||||
// on writeGCSizeTrigger receive. It implements a
|
||||
// backoff with delay of writeGCSizeDelay duration
|
||||
// to avoid very frequent database operations.
|
||||
// writeGCSizeWorker writes gcSize on trigger event
|
||||
// and waits writeGCSizeDelay after each write.
|
||||
// It implements a linear backoff with delay of
|
||||
// writeGCSizeDelay duration to avoid very frequent
|
||||
// database operations.
|
||||
func (db *DB) writeGCSizeWorker() {
|
||||
for {
|
||||
select {
|
||||
|
|
|
|||
Loading…
Reference in a new issue