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

Update ckb-db's COLUMNs Key Schemas to Use BlockNumber #4503

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

eval-exec
Copy link
Collaborator

@eval-exec eval-exec commented Jun 27, 2024

What problem does this PR solve?

This PR updates the key schema of RocksDB columns from using just the block hash to a combination of block number and block hash. By including the block number in the key, the new schema ensures that key-value pairs are ordered by block number. This reordering can improve query performance and data organization.

What is changed and how it works?

Related changes

  • Modified key schema in RocksDB from block_hash to block_number + block_hash.
  • Add a layer to the read/write process from ckb-store to ckb-db, allowing old versions of db-schemas to read/write old version data and new versions of db-schemas to read/write new version data.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • Performance regression
  • Breaking backward compatibility

Release note

Title Only: Include only the PR title in the release note.

@eval-exec eval-exec force-pushed the exec/rocksdb-sort branch 2 times, most recently from fb68c30 to 6e0364b Compare July 2, 2024 05:27
@eval-exec eval-exec force-pushed the exec/rocksdb-sort branch from 6e0364b to 8969739 Compare July 5, 2024 01:30
@eval-exec eval-exec added the t:enhancement Type: Feature, refactoring. label Jul 10, 2024
Copy link

github-actions bot commented Dec 5, 2024

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale To be closed due to a lack of activity label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale To be closed due to a lack of activity t:enhancement Type: Feature, refactoring.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant