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

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


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

commit 6e5ed9f30867af72d775e67f7a371bf0aec26f84
Author: deardeng <[email protected]>
AuthorDate: Fri Sep 19 10:49:19 2025 +0800

    branch-3.1: [fix](cloud) Delete useless table lock in 
replayUpdateCloudReplica #55579 (#55955)
    
    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 9d516880818..24041967d93 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
@@ -1020,25 +1020,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