capistrant commented on code in PR #19557:
URL: https://github.com/apache/druid/pull/19557#discussion_r3365001182
##########
server/src/main/java/org/apache/druid/server/coordinator/rules/PartialLoadRule.java:
##########
@@ -88,23 +88,29 @@ public boolean appliesTo(DataSegment segment, DateTime
referenceTimestamp)
}
@Override
- public void run(DataSegment segment, SegmentActionHandler handler)
+ public RuleRunResult run(DataSegment segment, SegmentActionHandler handler)
{
final PartialLoadMatcher.MatchResult result = matcher.match(segment,
segment.getLoadSpec());
if (result != null) {
- // Matcher resolved: route through the partial-load handler. The
wrappedLoadSpec map carries scheme-specific
- // data that the historical-side wrapper deserializes.
handler.replicateSegmentPartially(
segment,
PartialLoadProfile.forRequest(result.wrappedLoadSpec(),
result.fingerprint()),
getTieredReplicants()
);
- } else {
- // Matcher does not apply, but the rule still applies because
onCannotMatch == FULL_LOAD (FALL_THROUGH would
- // have caused appliesTo to return false, so run wouldn't be invoked).
Route through the regular full-load
- // handler.
- handler.replicateSegment(segment, getTieredReplicants());
+ // Flag the shard group for a post-pass: if the matcher resolves
asymmetrically across siblings, RunRules will
+ // dispatch emptyMatch loads to the unmatched ones so the broker's
PartitionHolder.isComplete() check still
+ // treats the group as queryable. Matchers without an emptyMatch (the
default) make the post-pass a no-op.
+ // Only the core partition group has an atomic-replace completeness
requirement on the broker, segments with
+ // no core partitions (e.g. append-only streaming) don't need sibling
reconciliation.
+ if (segment.getShardSpec().getNumCorePartitions() > 0) {
+ return new ShardGroupFollowup(segment, matcher, getTieredReplicants());
Review Comment:
will this create core partition set follow ups even when segments who are
outside of the core are the only ones who matched? do we want that?
--
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]