Skip to content

Commit aa644ca

Browse files
maochongxinshenyunlong
authored andcommitted
lsop support tablegroup (#188)
* lsop support tablegroup * lsop support tablegroup name routing
1 parent 4960170 commit aa644ca

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public static String getObVsnString(long version) {
8282
}
8383

8484
public static boolean isLsOpSupport() {
85-
return OB_VERSION >= OB_VERSION_4_2_3_0 && OB_VERSION < OB_VERSION_4_3_0_0;
85+
return (OB_VERSION >= OB_VERSION_4_2_3_0 && OB_VERSION < OB_VERSION_4_3_0_0) ||
86+
(OB_VERSION >= OB_VERSION_4_3_4_0);
8687
}
8788

8889
public static boolean isReturnOneResultSupport() {

src/main/java/com/alipay/oceanbase/rpc/table/ObTableClientLSBatchOpsImpl.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,18 @@ public Map<Long, Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableSing
341341
for (int j = 0; j < rowKeySize; j++) {
342342
rowKey[j] = rowkeyObjs.get(j).getValue();
343343
}
344+
<<<<<<< HEAD
344345
ObPair<Long, ObTableParam> tableObPair= obTableClient.getTable(tableName, rowKey,
345346
false, false, obTableClient.getRoute(false));
347+
=======
348+
349+
String real_tableName = tableName;
350+
if (this.entityType == ObTableEntityType.HKV && obTableClient.isTableGroupName(tableName)) {
351+
real_tableName = obTableClient.tryGetTableNameFromTableGroupCache(tableName, false);
352+
}
353+
ObPair<Long, ObTableParam> tableObPair= obTableClient.getTableBySingleRowKeyWithRoute(real_tableName, rowKey,
354+
false, false, false, obTableClient.getRoute(false));
355+
>>>>>>> 10c56c8 (lsop support tablegroup (#188))
346356
long lsId = tableObPair.getRight().getLsId();
347357

348358
Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableSingleOp>>>> tabletOperations

0 commit comments

Comments
 (0)