Skip to content

Commit c3269cf

Browse files
committed
fix distributed execution version control
1 parent 39f3946 commit c3269cf

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,22 @@ 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.obVsnMajor() == 0) {
415+
return true;
416+
} else if (ObGlobal.OB_VERSION >= ObGlobal.OB_VERSION_4_4_1_0) {
417+
return ObGlobal.OB_PROXY_VERSION >= ObGlobal.OB_PROXY_VERSION_4_3_6_0;
418+
} else {
419+
return false;
420+
}
421+
} else if (ObGlobal.OB_VERSION >= ObGlobal.OB_VERSION_4_4_1_0) {
413422
return true;
423+
} else {
424+
return false;
414425
}
415426
}
416427
}

0 commit comments

Comments
 (0)