jt2594838 commented on code in PR #18855:
URL: https://github.com/apache/iotdb/pull/18855#discussion_r4267715215


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/DropTableProcedure.java:
##########
@@ -78,6 +95,90 @@ public String getDropProgress() {
     return state == null ? getState().name() : state.name();
   }
 
+  public TDropTableModProgress getModFileProgress() {
+    final TDropTableModProgress progress = modFileProgress;
+    return progress == null ? null : progress.deepCopy();
+  }
+
+  /** Refreshes counters without allowing observability RPCs to block deletion 
indefinitely. */
+  public void updateModFileProgress() {
+    if (!modProgressLock.tryLock()) {
+      return;
+    }
+    try {
+      refreshModFileProgress();
+    } finally {
+      modProgressLock.unlock();
+    }
+  }

Review Comment:
   When there are concurrent SHOW DROP TABLE requests, only one will wait for 
the latest result; the others will just return the stale result?
   How about creating a future with the lock holder and letting the others wait 
for the result?



-- 
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]

Reply via email to