Fix: Ken drops databases on nodedown #5810
Open
+8
−4
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.
Description
This PR fixes an issue where Ken (the background indexer) would drop a database from its indexing queue if
fabric:design_docs/1returned anodedownormaintenance_modeerror.Previously, these errors were caught and treated as an empty list of design documents (
{ok, []}), causing Ken to believe there was nothing to index and removing the database from the pending queue.Changes
ken_server:design_docs/1to propagate{error, {nodedown, ...}}and{error, {maintenance_mode, ...}}instead of swallowing them.ken_server:update_db_indexes/2to handle these specific errors by exiting withresubmit. This triggers Ken's built-in retry mechanism, ensuring the database is added back to the queue to be retried later.Testing
src/ken/test/ken_repro_test.erl(if applicable to include in PR).nodedownerrors now trigger a resubmit instead of a silent drop.Fixes #5392<!-- Thank you for your contribution!
Overview
Testing recommendations
Related Issues or Pull Requests
Checklist
rel/overlay/etc/default.inisrc/docsfolder