Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datastore: EntityName replaces SnapshotType #2491

Merged
merged 15 commits into from
Nov 7, 2024
Merged

Conversation

battlmonstr
Copy link
Contributor

@battlmonstr battlmonstr commented Nov 6, 2024

SnapshotPath is decoupled from SnapshotType and fixed file extensions. SnapshotPath has a tag string without trying to interpret it.

SnapshotType is replaced with EntityName. EntityName constants match tags for simple conversions to/from SnapshotPath tag.

Block snapshot file extensions are defined in blocks/schema_config, and propagated to datastore/snapshots via Schema::RepositoryDef.

Related refactorings:

  • rename index_file() to related_path_ext(kIdxExtension)
  • dash in kIdxTxnHash2BlockName to eliminate tag underscore conversions
  • SnapshotRepository::is_stale_index_path reimplemented with a help of SnapshotBundleFactory::index_dependency_paths
  • use bundle factory in dev/snapshots.cpp create_index cmd

@battlmonstr battlmonstr changed the base branch from master to pr/data_store2 November 6, 2024 21:41
@battlmonstr battlmonstr changed the title Pr/snap type datastore: EntityName replaces SnapshotType Nov 6, 2024
@battlmonstr battlmonstr added the snapshots Framework for BitTorrent-based snapshots label Nov 7, 2024
Base automatically changed from pr/data_store2 to master November 7, 2024 17:00
@canepat canepat mentioned this pull request Nov 7, 2024
27 tasks
@battlmonstr battlmonstr marked this pull request as ready for review November 7, 2024 17:05
@canepat canepat added the erigon3 Erigon3 feature label Nov 7, 2024
@battlmonstr battlmonstr merged commit 391b1a7 into master Nov 7, 2024
6 checks passed
@battlmonstr battlmonstr deleted the pr/snap_type branch November 7, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erigon3 Erigon3 feature snapshots Framework for BitTorrent-based snapshots
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants