gavinchou commented on code in PR #33321:
URL: https://github.com/apache/doris/pull/33321#discussion_r1554983288
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java:
##########
@@ -701,6 +701,37 @@ public void dropMaterializedIndex(long tableId, List<Long>
indexIds, boolean dro
}
}
+ /**
+ * for cloud mode, drop rollup/materializedIndex in kv meta store
+ * @param tableId
+ * @param indexIdList
+ */
+ public void eraseDroppedIndexBackendReplicas(long tableId, List<Long>
indexIdList) {
Review Comment:
```suggestion
public void eraseDroppedIndex(long tableId, List<Long> indexIdList) {
```
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java:
##########
@@ -701,6 +701,37 @@ public void dropMaterializedIndex(long tableId, List<Long>
indexIds, boolean dro
}
}
+ /**
+ * for cloud mode, drop rollup/materializedIndex in kv meta store
+ * @param tableId
+ * @param indexIdList
+ */
+ public void eraseDroppedIndexBackendReplicas(long tableId, List<Long>
indexIdList) {
+ if (indexIdList == null || indexIdList.size() == 0) {
+ LOG.warn("indexIdList is empty");
+ return;
+ }
+ long tryCnt = 0;
+ while (true) {
+ if (tryCnt++ > Config.drop_rpc_retry_num) {
+ LOG.warn("failed to drop index {} of table {}, try cnt {}
reaches maximum retry count",
+ indexIdList, tableId, tryCnt);
+ break;
+ }
+
+ try {
+ dropMaterializedIndex(tableId, indexIdList, false);
+ break;
+ } catch (Exception e) {
+ LOG.warn("tryCnt:{}, eraseDroppedIndexBackendReplicas
exception:", tryCnt, e);
+ }
+ sleepSeveralMs();
+ }
+
+ LOG.info("eraseDroppedIndexBackendReplicas finished, tableId:{},
indexIdList:{}",
Review Comment:
```suggestion
LOG.info("eraseDroppedIndex finished, tableId:{}, indexIdList:{}",
```
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -1023,6 +1023,10 @@ public void
erasePartitionDropBackendReplicas(List<Partition> partitions) {
// no need send be delete task, when be report its tablets, fe will
send delete task then.
}
+ public void eraseDroppedIndexBackendReplicas(long tableId, List<Long>
indexIdList) {
Review Comment:
```suggestion
public void eraseDroppedIndex(long tableId, List<Long> indexIdList) {
```
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/datasource/CloudInternalCatalog.java:
##########
@@ -701,6 +701,37 @@ public void dropMaterializedIndex(long tableId, List<Long>
indexIds, boolean dro
}
}
+ /**
+ * for cloud mode, drop rollup/materializedIndex in kv meta store
+ * @param tableId
+ * @param indexIdList
+ */
+ public void eraseDroppedIndexBackendReplicas(long tableId, List<Long>
indexIdList) {
+ if (indexIdList == null || indexIdList.size() == 0) {
+ LOG.warn("indexIdList is empty");
+ return;
+ }
+ long tryCnt = 0;
+ while (true) {
+ if (tryCnt++ > Config.drop_rpc_retry_num) {
+ LOG.warn("failed to drop index {} of table {}, try cnt {}
reaches maximum retry count",
+ indexIdList, tableId, tryCnt);
+ break;
+ }
+
+ try {
+ dropMaterializedIndex(tableId, indexIdList, false);
+ break;
+ } catch (Exception e) {
+ LOG.warn("tryCnt:{}, eraseDroppedIndexBackendReplicas
exception:", tryCnt, e);
Review Comment:
```suggestion
LOG.warn("tryCnt:{}, eraseDroppedIndex exception:", tryCnt,
e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]