Skip to content

Conversation

banks
Copy link
Contributor

@banks banks commented Aug 15, 2025

Problem

In some edge case in production we've seen a tenant stuck with a secondary that downloads an older generation layer file than the one in the index and then when it becomes primary each time we do a deploy it logs an error about the file on disk being the wrong length. This is generally harmless for user correctness but is not optimal and an alarming error.

Summary of changes

This PR contains the 3 lines of fix (which is to check generation matches while including existing files in the next layer map) but is mostly testing method changes to setup the right state to test that. It feels like a low-risk enough change that a huge effort or refactor of testing code to make it testable probably isn't warranted, but this seemed to be small enough and not too unpleasant to be worth keeping. I'm open to feedback though if reviewers disagree.

There is one FIXME comment in timeline reconcile because I found a subtle issue that is kind of a bug but neutralised by implicit semantics right now. We should probably keep that in mind in future so a comment seems useful, but the fix seemed like too much scope creep to include here since there will be zero impact immediately anyway. If others would prefer a fix and agree we could make that a follow on but I suspect there is higher value work to do!

@banks banks requested a review from a team as a code owner August 15, 2025 15:34
@banks banks requested a review from vikasjiitk August 15, 2025 15:34
Copy link

No tests were run or test report is not available

Test coverage report is not available

The comment gets automatically updated with the latest test results
7a37d83 at 2025-08-15T16:12:44.808Z :recycle:

@banks
Copy link
Contributor Author

banks commented Aug 20, 2025

Move repo.

@banks banks closed this Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant