FrankChen021 commented on code in PR #19950:
URL: https://github.com/apache/druid/pull/19950#discussion_r3758121929
##########
server/src/main/java/org/apache/druid/server/coordinator/loading/HttpLoadQueuePeon.java:
##########
@@ -187,10 +198,23 @@ private SegmentLoadingCapabilities
fetchSegmentLoadingCapabilities()
);
}
catch (Throwable th) {
- throw new RE(th, "Received error while fetching historical capabilities
from Server[%s].", serverId);
+ SegmentLoadingCapabilities defaultCapabilities =
getDefaultLoadingCapabilities();
+ log.makeAlert(
+ th,
+ "Received error while fetching historical capabilities from
Server[%s]. Using default values[%s].",
+ serverId,
+ defaultCapabilities
+ ).emit();
+ return defaultCapabilities;
Review Comment:
[P2] Retry transient capability failures
Capabilities are fetched only in the constructor and stored in a final
field; LoadQueueTaskMaster retains the peon while the server remains in
inventory. A transient 503 or timeout therefore permanently pins the default
values, limiting a recovered server to one normal/turbo load thread when
batchSize is unset. Add re-fetch, retry, or fallback invalidation, and test
recovery after an initial failure.
##########
server/src/main/java/org/apache/druid/server/coordinator/loading/HttpLoadQueuePeon.java:
##########
@@ -187,10 +198,23 @@ private SegmentLoadingCapabilities
fetchSegmentLoadingCapabilities()
);
}
catch (Throwable th) {
- throw new RE(th, "Received error while fetching historical capabilities
from Server[%s].", serverId);
+ SegmentLoadingCapabilities defaultCapabilities =
getDefaultLoadingCapabilities();
Review Comment:
[P2] Preserve interruption and fatal-error semantics
The new fallback converts every Throwable from Future.get() or JSON parsing
into successful peon creation. InterruptedException therefore clears the
interrupt flag and lets computeIfAbsent start/cache a peon during cancellation
or shutdown, while Error instances are also treated as recoverable. Restrict
fallback to expected communication/parsing exceptions; restore and propagate
interruption and non-recoverable errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]