Skip to content

Commit 1edee20

Browse files
committed
retry logic for ObTableClient execute
1 parent 4837e01 commit 1edee20

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
}
@@ -1660,7 +1661,9 @@ private ObPair<Long, ObTableParam> getTable(String tableName, Object[] rowKey,
16601661
}
16611662

16621663
long partId = getPartition(tableEntry, row); // partition id in 3.x, origin partId in 4.x, logicId
1663-
1664+
if (refresh) {
1665+
refreshTableLocationByTabletId(tableEntry, tableName, getTabletIdByPartId(tableEntry, partId));
1666+
}
16641667
return getTableInternal(tableName, tableEntry, partId, waitForRefresh, route);
16651668
}
16661669

0 commit comments

Comments
 (0)