chihsuan opened a new pull request, #10884:
URL: https://github.com/apache/ozone/pull/10884

   ## What changes were proposed in this pull request?
   
   `QuotaRepairTask` scans 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 
with `IN_PROGRESS` held. 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:
   
   1. Extract the scan loop into `scanTableInBatches` with an injectable 
per-record consumer.
   2. Enqueue batches via `putBatch`, which fails fast when a worker has 
already exited.
   3. Treat interruption as a scan failure on both producer and worker side.
   4. On failure, still await all workers and scan tasks before returning, 
since the DB checkpoint is deleted in a finally block and no worker may outlive 
it.
   
   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):
   
   ```shell
   mvn -pl :ozone-manager test -Dtest=TestQuotaRepairTask -DskipShade 
-DskipRecon -DskipDocs
   ```
   
   Repository checkstyle also passed:
   
   ```shell
   ./hadoop-ozone/dev-support/checks/checkstyle.sh
   ```
   
   Generated-by:<model>
   


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

Reply via email to