Skip to content

Commit 16f9221

Browse files
authored
add new put into retry structure (#392)
1 parent 66d3970 commit 16f9221

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,11 +2440,16 @@ public ObPayload execute(final ObHbaseRequest request) throws Exception {
24402440
row.add("K", request.getKeys().get(keyIdx).getValue());
24412441
row.add("Q", request.getCfRows().get(0).getCells().get(0).getQ().getValue());
24422442
row.add("T", request.getCfRows().get(0).getCells().get(0).getT().getValue());
2443-
ObTableParam tableParam = tableRoute.getTableParam(realTableName, row);
2444-
ObTable obTable = tableParam.getObTable();
2445-
request.setTimeout(obTable.getObTableOperationTimeout());
2446-
request.setTabletId(tableParam.getTabletId());
2447-
return executeWithRetry(obTable, request, realTableName);
2443+
return execute(realTableName,
2444+
new OperationExecuteCallback<ObPayload>(row, null) {
2445+
@Override
2446+
ObPayload execute(ObTableParam tableParam) throws Exception {
2447+
ObTable obTable = tableParam.getObTable();
2448+
request.setTimeout(obTable.getObTableOperationTimeout());
2449+
request.setTabletId(tableParam.getTabletId());
2450+
return executeWithRetry(obTable, request, realTableName);
2451+
}
2452+
});
24482453
}
24492454
}
24502455

0 commit comments

Comments
 (0)