Repository navigation
Conversation
jt2594838
reviewed
Oct 14, 2026
Comment on lines
+103
to
+113
| /** Refreshes counters without allowing observability RPCs to block deletion indefinitely. */ | ||
| public void updateModFileProgress() { | ||
| if (!modProgressLock.tryLock()) { | ||
| return; | ||
| } | ||
| try { | ||
| refreshModFileProgress(); | ||
| } finally { | ||
| modProgressLock.unlock(); | ||
| } | ||
| } |
Contributor
There was a problem hiding this 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?
Collaborator
Author
There was a problem hiding this comment.
Applied in f434aa0. 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Extends #18806 so
information_schema.drop_table_proceduresreports live mod file progress while an asynchronousDROP TABLEis inDELETE_DATA.written_mod_file_countincreases after a distinct mod file has been written and closed successfully.remaining_mod_file_countcounts the pending mod files once all participating regions have identified their totals. Shared mod files are counted once; TsFiles removed outright are excluded. A drop with no mod files reports0, 0.ConfigNode queries the DataNode executing each region and updates the targets when deletion retries select another replica, counting each region once. Unknown counters remain SQL
NULL, including unavailable progress RPCs. A region that has not started reports zero written with an unknown remaining count. The final snapshot is retained with the procedure and serialized compatibly with the previous procedure format.Validation
IoTDBDropTableModProgressITandIoTDBTableIT#testAsyncDropTableProgresspassed with TableSimpleIT and TableClusterIT (HighPerformanceMode, 1 ConfigNode + 3 DataNodes, data replication factor 2).git diff --checkpassed. Integration-test packaging used-Drat.skip=truebecause the existing Go submodule contains files rejected by RAT.This PR has: