Repository navigation
lib/db: Don't get blocklists on drop and missing continue (ref #6457) - #6502
Merged
Merged
Conversation
calmh
previously approved these changes
Apr 6, 2020
Member
Author
|
Wait merging please |
calmh
previously approved these changes
Apr 6, 2020
Member
Author
|
Sorry for for dismissing again - went on a little hunt for other places were we needlessly get the full file info. I'll probably in a further step remove |
calmh
approved these changes
Apr 6, 2020
calmh
pushed a commit
to calmh/syncthing
that referenced
this pull request
Apr 7, 2020
calmh
added a commit
that referenced
this pull request
Apr 8, 2020
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This fixes the panic in #6457, however not the underlying problem.
After quite extensive debugging with @eiszfuchs (thanks) the problem there became clear: While the check on upgrade makes sure there is a file info for ever global list entry, it does not unmarshal that file info. On dropping a file we do, and as part of unmarshalling we also look for the block list. That lookup then failed and caused the file not found error (which mislead me for a long time, as the file itself is there, just not the blocks).
Now we only get the truncated file info when dropping a file, which is enough and thus avoids the panic. The file info is still without a block list, so a problem will likely come up at some other point. And I have no clue what might cause it in the first place. In the debugged instance no RCs prior to 1.4.1-rc.3 were ever installed (and known bugs causing missing blocklists were only present in RCs).
The missing (now added) continue was luckily harmless: Without it the key was deleted twice, which has no consequence.