Caideyipi commented on code in PR #18855:
URL: https://github.com/apache/iotdb/pull/18855#discussion_r4269738996
##########
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:
Applied in f434aa04169. Concurrent `SHOW DROP TABLE` requests now wait on
the same in-flight `CompletableFuture` before reading the refreshed counters.
The final refresh uses the same coordination so an earlier query cannot
overwrite the final snapshot. Added a regression test for the wait behavior;
all 10 `DropTableProcedureTest` tests pass.
--
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]