Skip to content

Commit 8bb9560

Browse files
committed
draft LSBatchImpl
1 parent 8490fee commit 8bb9560

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,16 +321,15 @@ private Object[] calculateRowKey(ObTableSingleOp operation) {
321321
return rowKey;
322322
}
323323

324-
325324
private List<ObTableSingleOp> extractOperations(List<ObPair<Integer, ObTableSingleOp>> operationsPairs) throws Exception {
326325
List<ObTableSingleOp> operations = new ArrayList<>(operationsPairs.size());
327326
for (ObPair<Integer, ObTableSingleOp> pair : operationsPairs) {
328327
operations.add(pair.getRight());
329328
}
330329
return operations;
331330
}
332-
333-
public Map<Long, Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableSingleOp>>>>> prepareOperations(List<ObTableSingleOp> operations) throws Exception {
331+
332+
public Map<Long, Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableSingleOp>>>>> prepareOperations(List<ObTableSingleOp> operations) throws Exception {
334333
Map<Long, Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableSingleOp>>>>> lsOperationsMap = new HashMap<>();
335334

336335
if (obTableClient.isOdpMode()) {
@@ -373,11 +372,11 @@ public Map<Long, Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableSing
373372
return lsOperationsMap;
374373
}
375374

376-
public Map<Long, Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableSingleOp>>>>> partitionPrepare() throws Exception {
375+
public Map<Long, Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableSingleOp>>>>> partitionPrepare()
376+
throws Exception {
377377
List<ObTableSingleOp> operations = getSingleOperations();
378378
return prepareOperations(operations);
379379
}
380-
381380

382381
/*
383382
* Partition execute.
@@ -615,7 +614,7 @@ public void partitionExecute(ObTableSingleOpResult[] results,
615614
private boolean shouldRetry(Throwable throwable) {
616615
return throwable instanceof ObTableNeedFetchAllException;
617616
}
618-
617+
619618
/*
620619
* Execute internal.
621620
*/
@@ -649,7 +648,7 @@ public ObTableSingleOpResult[] executeInternal() throws Exception {
649648
public void doTask() {
650649
try {
651650
ThreadLocalMap.transmitContextMap(context);
652-
executeWithRetries(finalObTableOperationResults, entry, maxRetries);
651+
partitionExecute(finalObTableOperationResults, entry);
653652
} catch (Exception e) {
654653
logger.error(LCD.convert("01-00026"), e);
655654
executor.collectExceptions(e);

0 commit comments

Comments
 (0)