Skip to content

Commit ddb20e8

Browse files
committed
set lsId as INVALID_LS_ID for non-partitioned table
1 parent 392a368 commit ddb20e8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/com/alipay/oceanbase/rpc/location/LocationUtil.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,11 +1583,10 @@ private static ObPartitionEntry getPartitionLocationFromResultSet(TableEntry tab
15831583
long partitionId;
15841584
partitionId = rs.getLong("tablet_id");
15851585
long lsId = withLsId ? rs.getLong("ls_id") : INVALID_LS_ID;
1586-
if (!rs.wasNull()) {
1587-
tabletLsIdMap.put(partitionId, lsId);
1588-
} else {
1589-
tabletLsIdMap.put(partitionId, INVALID_LS_ID); // non-partitioned table
1586+
if (withLsId && rs.wasNull()) {
1587+
lsId = INVALID_LS_ID;
15901588
}
1589+
tabletLsIdMap.put(partitionId, lsId);
15911590
ObPartitionLocationInfo partitionLocationInfo = partitionEntry
15921591
.getPartitionInfo(partitionId);
15931592
ObPartitionLocation location = partitionLocationInfo.getPartitionLocation();

0 commit comments

Comments
 (0)