Skip to content

Commit

Permalink
chain: Increase flush thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechampine committed Feb 10, 2024
1 parent 7db4ad2 commit 80170fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ func (db *DBStore) AddBlock(b types.Block, bs *consensus.V1BlockSupplement) {
func (db *DBStore) shouldFlush() bool {
// NOTE: these values were chosen empirically and should constitute a
// sensible default; if necessary, we can make them configurable
const flushSizeThreshold = 2e6
const flushDurationThreshold = 100 * time.Millisecond
const flushSizeThreshold = 20e6
const flushDurationThreshold = 1000 * time.Millisecond
return db.unflushed >= flushSizeThreshold || time.Since(db.lastFlush) >= flushDurationThreshold
}

Expand Down

0 comments on commit 80170fd

Please sign in to comment.