Skip to content

Improve index file header checkpoint logic in x/blockdb #4074

@DracoLi

Description

@DracoLi

Context and scope

Currently, we persist the index file header whenever the written block height is a multiple of CheckpointInterval. This approach is not ideal, as blocks can be written out of order during bootstrapping, potentially leading to concurrent calls to persist the index header. Instead, we can checkpoint after every x written blocks to smooth out the writes.

See #4027 (comment)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions