Skip to content

Rentention strategies don't work as expected #42

@kalabukdima

Description

@kalabukdima

The most common scenario for us is:

  • Set the initial from_head(K) to start syncing even if there is no archival data
  • Every time there is a new index of archival chunks, call retain with from_block set to the current archive height to clean up the old blocks.

However, it fails with heavy consequences in the following scenario:

  • Archives stop syncing, so we periodically call retain with from_block with the same block N
  • When Head - K becomes greater than N the storage starts to clean blocks up to Head - K
  • The next time we call retain(N) it says that there is a gap and drops the entire database
  • It then starts ingestion from some block above the finalized head (2 blocks from head)
  • This repeats on every consequent call to retain(N)

I'd say the database should never be fully dropped without manual intervention. Once we run hotblocks in a separate service, we can add an internal endpoint for that.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions