FrankChen021 commented on code in PR #19625:
URL: https://github.com/apache/druid/pull/19625#discussion_r3466973344
##########
server/src/main/java/org/apache/druid/segment/metadata/AbstractSegmentMetadataCache.java:
##########
@@ -717,8 +718,29 @@ public Set<SegmentId> refreshSegments(final Set<SegmentId>
segments) throws IOEx
.add(segmentId);
}
+ // Refresh each dataSource independently so that a failure (e.g. a
SegmentMetadataQuery timeout on
+ // one dataSource) does not abort the whole cycle and starve the remaining
dataSources of schema.
for (Map.Entry<String, TreeSet<SegmentId>> entry : segmentMap.entrySet()) {
- updatedSegmentIds.addAll(refreshSegmentsForDataSource(entry.getKey(),
entry.getValue()));
+ final String dataSource = entry.getKey();
+ try {
+ updatedSegmentIds.addAll(refreshSegmentsForDataSource(dataSource,
entry.getValue()));
+ }
+ catch (QueryInterruptedException e) {
Review Comment:
[P2] Do not treat every QueryInterruptedException as shutdown
This catch rethrows all QueryInterruptedException instances before the
per-datasource failure handler. In Druid, QueryInterruptedException is also
used as a generic client-side wrapper for failed queries, including remote
QueryExceptions with unknown/runtime failures, not only actual thread
interruption. When one datasource's SegmentMetadataQuery fails through that
wrapper, refreshSegments still aborts the whole cycle, later datasources are
skipped, and no segment/schemaCache/refresh/failed metric is emitted for the
offending datasource. Please distinguish real local interruption/cancellation
from ordinary query failure, for example by checking the cause/errorCode, and
let non-interruption query failures follow the isolated datasource path.
--
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]