HDDS-15997. Fix QuotaRepairTask scan hang and partial counts on worker failure - #10884
Open
chihsuan wants to merge 2 commits into
Open
HDDS-15997. Fix QuotaRepairTask scan hang and partial counts on worker failure#10884chihsuan wants to merge 2 commits into
chihsuan wants to merge 2 commits into
Conversation
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.
What changes were proposed in this pull request?
QuotaRepairTaskscans each table with one producer thread feeding batches to worker threads through a bounded queue. If all workers die with an exception, the producer blocks forever on the full queue and the repair hangs withIN_PROGRESSheld. If the scan is interrupted, both sides return silently and the partially scanned counts are submitted through Ratis as a successful repair.This change makes scan failures fail the repair instead:
scanTableInBatcheswith an injectable per-record consumer.putBatch, which fails fast when a worker has already exited.New unit tests cover worker failure, producer interrupt, and awaiting in-flight workers. This is a prerequisite for HDDS-15835, which adds the first per-record consumer that reads RocksDB and makes worker failure realistic.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15997
How was this patch tested?
Focused unit tests passed (7 tests, no failures):
mvn -pl :ozone-manager test -Dtest=TestQuotaRepairTask -DskipShade -DskipRecon -DskipDocsRepository checkstyle also passed:
Generated-by: Codex (GPT-5)