File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/com/alipay/oceanbase/rpc/location Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1257,8 +1257,15 @@ private static ObPartitionEntry getPartitionLocationFromResultSetByTablet(TableE
12571257 location = partitionLocationInfo .getPartitionLocation ();
12581258 if (location == null ) {
12591259 location = new ObPartitionLocation ();
1260- partitionLocationInfo .updateLocation (location , lsId );
12611260 }
1261+ partitionLocationInfo .updateLocation (location , lsId );
1262+ } finally {
1263+ partitionLocationInfo .rwLock .writeLock ().unlock ();
1264+ }
1265+ } else {
1266+ partitionLocationInfo .rwLock .writeLock ().lock ();
1267+ try {
1268+ partitionLocationInfo .updateLocation (location , lsId );
12621269 } finally {
12631270 partitionLocationInfo .rwLock .writeLock ().unlock ();
12641271 }
You can’t perform that action at this time.
0 commit comments