csudharsanan commented on code in PR #3043:
URL: https://github.com/apache/helix/pull/3043#discussion_r2167559803
##########
helix-core/src/main/java/org/apache/helix/model/OnlineOfflineSMD.java:
##########
@@ -62,9 +72,8 @@ public static StateModelDefinition build() {
builder.addTransition(States.OFFLINE.name(), States.ONLINE.name(), 1);
builder.addTransition(States.OFFLINE.name(),
HelixDefinedState.DROPPED.name());
- // bounds
- builder.dynamicUpperBound(States.ONLINE.name(),
- StateModelDefinition.STATE_REPLICA_COUNT_ALL_REPLICAS);
+ // bounds - uses the instanceCount parameter instead of constant
+ builder.dynamicUpperBound(States.ONLINE.name(), instanceCount);
Review Comment:
I understand the concern about changing public APIs, but I believe this
change is actually backwards compatible and follows standard Java patterns for
API extension.
The existing build() method remains unchanged and continues to use the
default behavior (STATE_REPLICA_COUNT_ALL_REPLICAS). All existing code calling
OnlineOfflineSMD.build() will work exactly as before with no behavior changes.
--
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]