fix: Make HttpLoadQueuePeon degrade gracefully instead of throwing on fetch failure - #20128
Open
waterWang wants to merge 1 commit into
Open
fix: Make HttpLoadQueuePeon degrade gracefully instead of throwing on fetch failure#20128waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
… fetch failure When a historical server returns a non-200/404 response or is unreachable, fetchSegmentLoadingCapabilities() throws an RE, which propagates through LoadQueueTaskMaster.resetPeonsForNewServers() into PrepareBalancerAndLoadQueues. The top-level DruidCoordinator.DutiesRunnable.run() catches and logs it, but segment management stops entirely for ALL servers — not just the unhealthy one. Fix: degrade gracefully by returning default SegmentLoadingCapabilities derived from the configured batch size, with a warning log. The peon is still created, the server is still managed with conservative defaults, and the rest of the duty group proceeds normally.
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.
Description
Fixes #19950
When a historical server returns a non-200/404 response or is unreachable
during
fetchSegmentLoadingCapabilities(), theHttpLoadQueuePeonconstructorthrows an
RE. This exception propagates throughLoadQueueTaskMaster.resetPeonsForNewServers()intoPrepareBalancerAndLoadQueues, which is the first duty in theHistoricalManagementDutiesgroup. The top-levelDruidCoordinator.DutiesRunnable.run()catches and logs the exception, butsegment management (loading, balancing, handoffs) stops entirely for all
servers — not just the unhealthy one. Ingestion tasks back up waiting for
handoff.
Changes
fetchSegmentLoadingCapabilities(): Instead of throwingREon non-200/404responses or any
Throwable, return defaultSegmentLoadingCapabilitiesderived from the configured batch size, with a warning log. The peon is still
created, the server is still managed with conservative defaults, and the rest
of the duty group proceeds normally.
capabilities).
Key design decisions
extends this same graceful degradation to non-200 responses and exceptions.
log.makeAlert()is preserved for non-200 responses so operators still getalerted about the unhealthy server.
Coordinator ticking.
Release notes
Fixed a bug where a single unhealthy or unreachable historical server could
stall all segment loading and balancing across the cluster.