Skip to content

Commit 4437642

Browse files
committed
add retry logic for executeMutation
1 parent ce144d8 commit 4437642

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,15 +786,14 @@ private <T> T executeMutation(String tableName, MutationExecuteCallback<T> callb
786786
obPair = new ObPair<Long, ObTableParam>(0L, new ObTableParam(odpTable));
787787
} else {
788788
if (null != callback.getRowKey()) {
789+
// in the case of retry, the location always needs to be refreshed here
789790
if (tryTimes > 1) {
790791
TableEntry entry = getOrRefreshTableEntry(tableName, false, false, false);
791792
Long partId = getPartition(entry, callback.getRowKey());
792793
refreshTableLocationByTabletId(entry, tableName, getTabletIdByPartId(entry, partId));
793794
}
794795
// using row key
795-
obPair = getTable(tableName, callback.getRowKey(),
796-
needRefreshTableEntry, tableEntryRefreshIntervalWait,
797-
false, route);
796+
obPair = getTable(tableName, callback.getRowKey(), needRefreshTableEntry, tableEntryRefreshIntervalWait, false, route);
798797
} else if (null != callback.getKeyRanges()) {
799798
// using scan range
800799
obPair = getTable(tableName, new ObTableQuery(),

0 commit comments

Comments
 (0)