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

fix: remove epoch migration code #4563

Merged
merged 4 commits into from
Feb 5, 2024
Merged

fix: remove epoch migration code #4563

merged 4 commits into from
Feb 5, 2024

Conversation

notanatol
Copy link
Contributor

Checklist

Description

closes #4540

@notanatol notanatol marked this pull request as draft January 31, 2024 23:19
@notanatol notanatol self-assigned this Jan 31, 2024
@istae
Copy link
Member

istae commented Feb 1, 2024

@@ -225,5 +225,5 @@ func testStoreIterator(t *testing.T, store storage.StateStorer, prefix string, s
func testEmpty(t *testing.T, store storage.StateStorer) {
t.Helper()

testStoreIterator(t, store, "", 1) // 1 because of the schema entry.
testStoreIterator(t, store, "", 0) // 1 because of the schema entry.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@istae is this comment still relevant?

do we still have 'schema entry' or was it part of the previous localstore?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this schema entry probably has to do with the empty prefix and the way leveldb is implemented?
maybe @janos can help us here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which begs the question, how does changing it to 0 continue to work?

Copy link
Member

@istae istae Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we used to manually insert a schema entry to keep a track of the migrations https://github.com/ethersphere/bee/blob/master/pkg/statestore/leveldb/leveldb.go#L176

but now that migrations are handled elsewhere, it is okay to remove that comment @notanatol

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is correct, schema name was inserted under a specific key, but now since putSchemaName is not used, 0 is the correct value. Comment should be removed.

@notanatol notanatol marked this pull request as ready for review February 2, 2024 16:01
@notanatol notanatol added the ready for review The PR is ready to be reviewed label Feb 2, 2024
@istae istae requested review from istae and acha-bill February 2, 2024 16:15
@notanatol notanatol changed the title wip: remove epoch migration code fix: remove epoch migration code Feb 4, 2024
@notanatol notanatol requested a review from janos February 5, 2024 08:59
@acha-bill acha-bill merged commit 0a7fd5c into master Feb 5, 2024
12 checks passed
@acha-bill acha-bill deleted the fix-epoch-cleanup branch February 5, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull-request ready for review The PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove any old localstore rewrite epoch migration logic
4 participants