Skip to content

Commit 1ba4e9e

Browse files
committed
fix getPartitionLocation nullptr && resolve conflict error
1 parent 48c87fe commit 1ba4e9e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,8 +1664,7 @@ private ObPair<Long, ReplicaLocation> getPartitionReplica(TableEntry tableEntry,
16641664
*/
16651665
private ReplicaLocation getPartitionLocation(TableEntry tableEntry, long partId,
16661666
ObServerRoute route) {
1667-
long tabletId = getTabletIdByPartId(tableEntry, partId);
1668-
return tableEntry.getPartitionEntry().getPartitionLocationWithTabletId(tabletId)
1667+
return tableEntry.getPartitionEntry().getPartitionLocationWithPartId(partId)
16691668
.getReplica(route);
16701669

16711670
}

src/main/java/com/alipay/oceanbase/rpc/stream/ObTableClientQueryAsyncStreamResult.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717

1818
package com.alipay.oceanbase.rpc.stream;
1919

20+
import com.alipay.oceanbase.rpc.ObGlobal;
2021
import com.alipay.oceanbase.rpc.ObTableClient;
2122
import com.alipay.oceanbase.rpc.bolt.transport.ObTableConnection;
2223
import com.alipay.oceanbase.rpc.exception.ObTableException;
2324
import com.alipay.oceanbase.rpc.exception.ObTableNeedFetchAllException;
2425
import com.alipay.oceanbase.rpc.exception.ObTableRetryExhaustedException;
26+
import com.alipay.oceanbase.rpc.location.model.TableEntry;
2527
import com.alipay.oceanbase.rpc.location.model.partition.ObPair;
2628
import com.alipay.oceanbase.rpc.protocol.payload.Constants;
2729
import com.alipay.oceanbase.rpc.protocol.payload.ObPayload;
@@ -238,7 +240,7 @@ public boolean next() throws Exception {
238240
.getTableQuery(), realTableName));
239241
setEnd(true);
240242
} else {
241-
setExpectant(refreshPartition(this.asyncRequest.getObTableQueryRequest()
243+
setExpectant(refreshPartition(this.asyn cRequest.getObTableQueryRequest()
242244
.getTableQuery(), realTableName));
243245
}
244246
} else {

0 commit comments

Comments
 (0)