Copilot commented on code in PR #3691:
URL: https://github.com/apache/celeborn/pull/3691#discussion_r3278309596
##########
common/src/main/java/org/apache/celeborn/common/client/MasterClient.java:
##########
@@ -241,7 +285,13 @@ private RpcEndpointRef
getOrSetupRpcEndpointRef(AtomicInteger currentIndex) {
if (endpointRef == null) {
int index = currentIndex.get();
do {
- RpcEndpointRef tempEndpointRef =
setupEndpointRef(activeMasterEndpoints.get(index));
+ RpcEndpointRef tempEndpointRef;
+ try {
+ tempEndpointRef = setupEndpointRef(activeMasterEndpoints.get(index));
+ } catch (RuntimeException e) {
+ currentIndex.set((index + 1) % activeMasterEndpoints.size());
+ throw e;
+ }
Review Comment:
`getOrSetupRpcEndpointRef` now rethrows `RuntimeException` from
`setupEndpointRef` (for bootstrap-time redirect handling), so callers can
observe unchecked exceptions from this method. Consider updating the method’s
contract/Javadoc (or using a more specific exception type) to make this
expected retry-path behavior clearer for future maintainers.
--
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]