This is an automated email from the ASF dual-hosted git repository.
hellostephen pushed a commit to branch tmp-17116
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/tmp-17116 by this push:
new 5133f5aca30 Skip unprotect update replica unprotect delete replica
(#54030)
5133f5aca30 is described below
commit 5133f5aca3059a678dbd2d932ce72c04bacce11c
Author: deardeng <[email protected]>
AuthorDate: Tue Jul 29 18:49:23 2025 +0800
Skip unprotect update replica unprotect delete replica (#54030)
---
.../org/apache/doris/datasource/InternalCatalog.java | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
index 8ca76357db6..b00c56f0822 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
@@ -1086,6 +1086,10 @@ public class InternalCatalog implements
CatalogIf<Database> {
MaterializedIndex materializedIndex =
partition.getIndex(info.getIndexId());
Tablet tablet = materializedIndex.getTablet(info.getTabletId());
Replica replica = tablet.getReplicaById(info.getReplicaId());
+ if (replica == null) {
+ LOG.warn("skip table {}, unprotectUpdateReplica {}",
olapTable.getName(), info);
+ return;
+ }
Preconditions.checkNotNull(replica, info);
replica.updateVersionWithFailed(info.getVersion(),
info.getLastFailedVersion(),
info.getLastSuccessVersion());
@@ -1118,10 +1122,14 @@ public class InternalCatalog implements
CatalogIf<Database> {
}
public void unprotectDeleteReplica(OlapTable olapTable, ReplicaPersistInfo
info) {
- Partition partition = olapTable.getPartition(info.getPartitionId());
- MaterializedIndex materializedIndex =
partition.getIndex(info.getIndexId());
- Tablet tablet = materializedIndex.getTablet(info.getTabletId());
- tablet.deleteReplicaByBackendId(info.getBackendId());
+ try {
+ Partition partition =
olapTable.getPartition(info.getPartitionId());
+ MaterializedIndex materializedIndex =
partition.getIndex(info.getIndexId());
+ Tablet tablet = materializedIndex.getTablet(info.getTabletId());
+ tablet.deleteReplicaByBackendId(info.getBackendId());
+ } catch (Exception e) {
+ LOG.warn("skip table {} ReplicaPersistInfo {}",
olapTable.getName(), info, e);
+ }
}
public void replayDeleteReplica(ReplicaPersistInfo info) throws
MetaNotFoundException {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]