Fix append_update_replies case clause in fabric_doc_update#5989
Merged
Conversation
7d253a1 to
c2328b9
Compare
6 tasks
c2328b9 to
7a74ea8
Compare
rnewson
reviewed
May 1, 2026
In `serialize_worker_startup=false` mode it was possible before to get a function_clause error in `fabric_doc_update:append_update_replies/3`. The function_clause was because of an empty `Docs` list and a non-empty `Replies` list. That happened when we had at least two conflicted replies for a doc one arriving, and others in-flight, the arriving one would knock out the doc from the expected replies list, such that when the second reply arrived, it wouldn't match up with anything. To fix this, keep track of conflicts separately and check that conflicted list before extra workers spawn, and also avoid altering the grouped docs structure for in-flight requests Also fix another regression, and that's in case of sws=false to keep going and perform the quorum the way we did before sws feature. Previously, we only spawned the workers in parallel but still short-cut the quorum on a conflict.
7a74ea8 to
0483ee5
Compare
rnewson
approved these changes
May 1, 2026
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.
In
serialize_worker_startup=falsemode it was possible before to get a function_clause error inappend_update_replies/3. Thefunction_clausewas because of an emptyDocslist and a non-emptyReplieslist. That happened when we had at least two conflicted replies for a doc, one arriving and others in-flight. The arriving one would knock out the doc from the expected replies list, such that when the second reply arrived, it wouldn't match up with anything.To fix this, keep track of conflicts separately and check that conflicted list before extra workers spawn, and also avoid altering the grouped docs structure for in-flight requests
Also fix another regression, and that's in case of sws=false to keep going and perform the quorum the way we did before sws feature. Previously, we only spawned the workers in parallel but still short-cut the quorum on a conflict.