zenoyang commented on code in PR #13836: URL: https://github.com/apache/doris/pull/13836#discussion_r1010212824
########## fe/fe-core/src/main/java/org/apache/doris/rpc/BackendServiceProxy.java: ########## @@ -64,7 +64,7 @@ private static class Holder { } static BackendServiceProxy get() { - return proxies[count.addAndGet(1) % PROXY_NUM]; + return proxies[Math.abs(count.addAndGet(1) % PROXY_NUM)]; Review Comment: If `count` exceeds the maximum value of `Integer`, the result of the remainder will be negative, which will cause an `IndexOutOfBoundsException` error -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org