csudharsanan commented on code in PR #3043:
URL: https://github.com/apache/helix/pull/3043#discussion_r2129895693
##########
helix-core/src/main/java/org/apache/helix/controller/stages/MessageGenerationPhase.java:
##########
@@ -250,17 +260,30 @@ private void generateMessage(final Resource resource,
final BaseControllerDataPr
pendingMessage, manager, resource, partition,
sessionIdMap, instanceName,
stateModelDef, cancellationMessage, isCancellationEnabled);
} else {
+ // Default currentReplicaNumber is -1 (provides metadata for
participant-side prioritization)
+ int currentReplicaNumber = -1;
Review Comment:
Setting currentReplicaNumber to not be -1 and as is might not work. These
are my thoughts, let me know what you think.
If you calculate and set a positive currentReplicaNumber for downward
transitions, you're essentially telling the participant that this message has a
specific priority order, which doesn't make sense for downward transitions.
The currentReplicaNumber field is designed for upward state transitions
where you want to bring replicas online in a specific order. For downward
transitions, the concept of "replica ordering" doesn't apply the same way.
My thought is upward and downward transitions might need completely
different prioritization strategies, so using the same numbering scheme for
both would be confusing and potentially incorrect.
--
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]