This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new dc89fca3668 branch-3.0: [fix](cloud) Delete useless table lock in 
replayUpdateCloudReplica #55579 (#55954)
dc89fca3668 is described below

commit dc89fca3668474acff722d4a177c23693d6c5c80
Author: deardeng <[email protected]>
AuthorDate: Tue Sep 16 14:36:46 2025 +0800

    branch-3.0: [fix](cloud) Delete useless table lock in 
replayUpdateCloudReplica #55579 (#55954)
    
    cherry pick from #55579
---
 .../apache/doris/cloud/datasource/CloudInternalCatalog.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java
 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java
index 98c6bed2ecb..0e29c7d8611 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java
@@ -1008,25 +1008,27 @@ public class CloudInternalCatalog extends 
InternalCatalog {
             LOG.warn("replay update cloud replica, unknown table {}", 
info.toString());
             return;
         }
+        LOG.debug("replay update a cloud replica {}", info);
 
-        olapTable.writeLock();
         try {
             unprotectUpdateCloudReplica(olapTable, info);
         } catch (Exception e) {
             LOG.warn("unexpected exception", e);
-        } finally {
-            olapTable.writeUnlock();
         }
     }
 
     private void unprotectUpdateCloudReplica(OlapTable olapTable, 
UpdateCloudReplicaInfo info) {
-        LOG.debug("replay update a cloud replica {}", info);
         Partition partition = olapTable.getPartition(info.getPartitionId());
         if (partition == null) {
             LOG.warn("replay update cloud replica, unknown partition {}, may 
be dropped", info.toString());
             return;
         }
+
         MaterializedIndex materializedIndex = 
partition.getIndex(info.getIndexId());
+        if (materializedIndex == null) {
+            LOG.warn("replay update cloud replica, unknown index {}, may be 
dropped", info.toString());
+            return;
+        }
 
         try {
             if (info.getTabletId() != -1) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to