maytasm commented on a change in pull request #9965:
URL: https://github.com/apache/druid/pull/9965#discussion_r440541949
##########
File path:
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -256,15 +256,24 @@ public boolean isLeader()
* @return tier -> { dataSource -> underReplicationCount } map
*/
public Map<String, Object2LongMap<String>>
computeUnderReplicationCountsPerDataSourcePerTier()
+ {
+ final Iterable<DataSegment> dataSegments =
segmentsMetadataManager.iterateAllUsedSegments();
+ return
computeUnderReplicationCountsPerDataSourcePerTierForSegments(dataSegments);
+ }
+
+ /**
+ * @return tier -> { dataSource -> underReplicationCount } map
+ */
+ public Map<String, Object2LongMap<String>>
computeUnderReplicationCountsPerDataSourcePerTierForSegments(
Review comment:
Keeping the `segmentReplicantLookup` as possibly stale for now. This
still ensures that we will never return true (available) when it’s false (not
available) since we force refresh metadata. Although we can return false (not
available) when it’s true (available) for up to a period of coordinator run
longer for the full format response. This problem will only affects the full
format. We can loop back to this if we find that having the option to force
refresh the `segmentReplicantLookup` is useful. If that is the case then we
can use the existing query param, forceMetadataRefresh, to force refresh
`segmentReplicantLookup` too.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]