Skip to content

Commit f589e8c

Browse files
authored
direct load detach task support 451 (#419)
1 parent fc6d81c commit f589e8c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/main/java/com/alipay/oceanbase/rpc/ObGlobal.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ public static boolean isDistributeNeedTabletIdSupport() {
172172

173173
public static final long OB_VERSION_4_5_0_0 = calcVersion(4, (short) 5, (byte) 0, (byte) 0);
174174

175+
public static final long OB_VERSION_4_5_1_0 = calcVersion(4, (short) 5, (byte) 1, (byte) 0);
176+
175177
public static long OB_VERSION = calcVersion(0, (short) 0, (byte) 0, (byte) 0);
176178

177179
/*-------------------------------------------- OB_PROXY_VERSION --------------------------------------------*/

src/main/java/com/alipay/oceanbase/rpc/direct_load/protocol/v0/ObDirectLoadProtocolV0.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,14 @@ public ObDirectLoadDetachRpc getDetachRpc(ObDirectLoadTraceId traceId)
125125
+ " is not supported, minimum version required is "
126126
+ ObGlobal.getObVsnString(ObGlobal.OB_VERSION_4_4_2_0));
127127
}
128-
} else {
128+
} else if (obVersion < ObGlobal.OB_VERSION_4_5_1_0) {
129129
logger.warn("detach in ob version " + ObGlobal.getObVsnString(obVersion)
130-
+ "is not supported");
131-
throw new ObDirectLoadNotSupportedException("detach in ob version "
132-
+ ObGlobal.getObVsnString(obVersion)
133-
+ " is not supported");
130+
+ "is not supported, minimum version required is "
131+
+ ObGlobal.getObVsnString(ObGlobal.OB_VERSION_4_5_1_0));
132+
throw new ObDirectLoadNotSupportedException(
133+
"detach in ob version " + ObGlobal.getObVsnString(obVersion)
134+
+ " is not supported, minimum version required is "
135+
+ ObGlobal.getObVsnString(ObGlobal.OB_VERSION_4_5_1_0));
134136
}
135137
return new ObDirectLoadDetachRpcV0(traceId);
136138
}

0 commit comments

Comments
 (0)