Repository navigation
db/kv, db/migrations: drop the unused CodeCache table - #25463
Merged
Merged
Conversation
#24181 removed the persistent code store but left its table in existing chaindata.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the migration that removes the obsolete CodeCache table.
No open issues 🎉
What changed in this PR
Removes the unused CodeCache table left in existing chaindata after #24181 removed the persistent code store.
Changes:
- Registers
CodeCacheas a deprecated table. - Adds and registers a migration to drop it.
- Adds a regression test covering table removal and repeated execution.
| File | Description |
|---|---|
db/migrations/migrations.go |
Registers the migration for the chain database. |
db/migrations/migrations_test.go |
Tests removal of a populated table and safe repeated execution. |
db/migrations/drop_code_cache_table.go |
Drops the table and records migration completion in the same transaction. |
db/kv/tables.go |
Defines the legacy table name and adds it to the deprecated table list. |
Review effort: Balanced
AskAlexSharov
added a commit
that referenced
this pull request
Oct 28, 2026
…table_39 # Conflicts: # db/migrations/migrations.go
awskii
approved these changes
Oct 29, 2026
SoarinSkySagar
pushed a commit
to SoarinSkySagar/erigon
that referenced
this pull request
Oct 29, 2026
A chaindata with 1.6 GB of data and 7.4 GB free (after erigontech#25463 and erigontech#25465) passes the bloat ratio but not the 10 GB minimum, so it is never compacted. Ratio 3 and 5 GB free compact it once; normal prune churn stays far below 3x the data.
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 30, 2026
…table_39 # Conflicts: # db/migrations/migrations_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#24181 removed the persistent code store but kept its table in existing chaindata; on a datadir from before that change it still holds about 4 GB that nothing reads. A migration now drops it.