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(storage): only delete static file if last_block is on a previous static file #11029

Merged
merged 13 commits into from
Sep 25, 2024

Conversation

joshieDo
Copy link
Collaborator

@joshieDo joshieDo commented Sep 19, 2024

closes issue raised by #11021 wrt to Transactions/Receipts static files

  • Having a block range with no transactions and unwinding to it was prematurely deleting the file.
  • Fixing it also meant adjusting how the update_index method works in such scenarios.
  • Adds more assertions to tests

@joshieDo joshieDo added C-bug An unexpected or incorrect behavior A-static-files Related to static files labels Sep 19, 2024
@joshieDo joshieDo marked this pull request as draft September 19, 2024 10:05
Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

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

Noticed one possible issue, gonna review again because the logic is difficult

crates/static-file/types/src/segment.rs Show resolved Hide resolved
Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

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

I'm not sure I fully understand this, but tests LGTM. Would appreciate another pair of eyes on it.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this looks correct, the docs help

@joshieDo joshieDo added this pull request to the merge queue Sep 25, 2024
Merged via the queue into main with commit 4070498 Sep 25, 2024
35 checks passed
@joshieDo joshieDo deleted the joshie/fix-unwind branch September 25, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-static-files Related to static files C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants