core, ethdb, trie: mode dirty data to clean cache on flush (#19307)
This PR is a more advanced form of the dirty-to-clean cacher (#18995), where we reuse previous database write batches as datasets to uncache, saving a dirty-trie-iteration and a dirty-trie-rlp-reencoding per block.
This commit is contained in:
committed by
Felix Lange
parent
df717abc99
commit
59e1953246
@ -24,7 +24,6 @@ const IdealBatchSize = 100 * 1024
|
||||
// when Write is called. A batch cannot be used concurrently.
|
||||
type Batch interface {
|
||||
Writer
|
||||
Deleter
|
||||
|
||||
// ValueSize retrieves the amount of data queued up for writing.
|
||||
ValueSize() int
|
||||
@ -32,8 +31,11 @@ type Batch interface {
|
||||
// Write flushes any accumulated data to disk.
|
||||
Write() error
|
||||
|
||||
// Reset resets the batch for reuse
|
||||
// Reset resets the batch for reuse.
|
||||
Reset()
|
||||
|
||||
// Replay replays the batch contents.
|
||||
Replay(w Writer) error
|
||||
}
|
||||
|
||||
// Batcher wraps the NewBatch method of a backing data store.
|
||||
|
Reference in New Issue
Block a user