Skip to content

Commit 49170d2

Browse files
committed
retry logic for ObTableClient execute
1 parent 4af6fbf commit 49170d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ private <T> T execute(String tableName, TableExecuteCallback<T> callback, ObServ
677677
tryTimes);
678678
if (ex instanceof ObTableNeedFetchAllException) {
679679
needFetchAllRouteInfo = true;
680+
getOrRefreshTableEntry(tableName, true, true, true);
680681
// reset failure count while fetch all route info
681682
this.resetExecuteContinuousFailureCount(tableName);
682683
}
@@ -1679,7 +1680,9 @@ private ObPair<Long, ObTableParam> getTable(String tableName, Object[] rowKey,
16791680
}
16801681

16811682
long partId = getPartition(tableEntry, row); // partition id in 3.x, origin partId in 4.x, logicId
1682-
1683+
if (refresh) {
1684+
refreshTableLocationByTabletId(tableEntry, tableName, getTabletIdByPartId(tableEntry, partId));
1685+
}
16831686
return getTableInternal(tableName, tableEntry, partId, waitForRefresh, route);
16841687
}
16851688

0 commit comments

Comments
 (0)