Skip to content

Commit 6694741

Browse files
authored
fix distributed execution version control (#425)
1 parent 39f3946 commit 6694741

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/main/java/com/alipay/oceanbase/rpc/bolt/transport/ObTableConnection.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,20 @@ private String logMessage(String traceId, String methodName, String endpoint, lo
406406
return stringBuilder.toString();
407407
}
408408

409+
// for server version, only ObServer 441 and above can support distributed execution
410+
// for ODP version, only ODP 436 and above can support distributed execution
411+
// so here we have to check both ObServer and ODP version to ensure the capability of distributed execution is supported or not
409412
private boolean isAllowDistributeCapability() {
410413
if (isOdpMode) {
411-
return ObGlobal.OB_PROXY_VERSION >= ObGlobal.OB_PROXY_VERSION_4_3_6_0;
412-
} else {
414+
if (ObGlobal.OB_VERSION >= ObGlobal.OB_VERSION_4_4_1_0) {
415+
return ObGlobal.OB_PROXY_VERSION >= ObGlobal.OB_PROXY_VERSION_4_3_6_0;
416+
} else {
417+
return false;
418+
}
419+
} else if (ObGlobal.OB_VERSION >= ObGlobal.OB_VERSION_4_4_1_0) {
413420
return true;
421+
} else {
422+
return false;
414423
}
415424
}
416425
}

0 commit comments

Comments
 (0)