JNSimba commented on code in PR #388: URL: https://github.com/apache/doris-flink-connector/pull/388#discussion_r1604574975
########## flink-doris-connector/src/main/java/org/apache/doris/flink/sink/BackendUtil.java: ########## @@ -76,11 +76,17 @@ public static BackendUtil getInstance( } public String getAvailableBackend() { + return getAvailableBackend(0); + } + + public String getAvailableBackend(int subtaskId) { long tmp = pos + backends.size(); while (pos < tmp) { - BackendV2.BackendRowV2 backend = backends.get((int) (pos++ % backends.size())); + BackendV2.BackendRowV2 backend = + backends.get((int) ((pos + subtaskId) % backends.size())); String res = backend.toBackendString(); if (tryHttpConnection(res)) { + pos++; Review Comment: If it fails, pos will not increase by 1. Is there a problem? -- 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