Skip to content

Fix bulk_get not_found response handling when revs=all#6004

Merged
nickva merged 1 commit into
mainfrom
fix-bulk-get-not-found-all-revs
May 18, 2026
Merged

Fix bulk_get not_found response handling when revs=all#6004
nickva merged 1 commit into
mainfrom
fix-bulk-get-not-found-all-revs

Conversation

@nickva
Copy link
Copy Markdown
Contributor

@nickva nickva commented May 18, 2026

Since revs=all when doc is not found we return {ok, []} we didn't count that response as a not_found response and success_possible would return false too early. If a node was in mm mode and that was the last response we could end up emitting that as an internal error instead of the proper "not found" result.

Since revs=all when doc is not found we return `{ok, []}` we didn't count that
response as a not_found response and success_possible would return false too
early. If a node was in mm mode and that was the last response we could end up
emitting that as an internal error instead of the proper "not found" result.
@rnewson
Copy link
Copy Markdown
Member

rnewson commented May 18, 2026

This is compounded if you fetch multiple documents at once where one exists and another does not and when they are in different shard ranges. if you receive the messages for the non-existent document before the ones for the doc that does exist, this code will return an error tuple (for reason 'maintenance_mode') for all the attempted gets.

@nickva nickva merged commit 54f7024 into main May 18, 2026
63 checks passed
@nickva nickva deleted the fix-bulk-get-not-found-all-revs branch May 18, 2026 16:14
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.

2 participants