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

   ## What changes were proposed in this pull request?
   
   DirectoryDeletingService (DDS) processes snapshots with parallel directory 
workers. The task thread retains the current snapshot DB handle, while each 
worker can retain previous-snapshot handles through reclaimable filters. Those 
handles hold striped `SNAPSHOT_DB_LOCK` read locks.
   
   Before this change, a worker could synchronously submit `PurgeDirectories` 
while retaining its previous-snapshot handles, or DDS could submit its final 
snapshot-property request while retaining the task-owned current handle. If 
`OMDoubleBufferFlushThread` was applying an earlier snapshot purge that needed 
the colliding write-lock stripe and the unflushed transaction limit was 
reached, both sides could wait indefinitely.
   
   This patch preserves per-snapshot worker parallelism while enforcing this 
order:
   
   1. Each worker closes its previous-snapshot DB handles after it finishes 
reading.
   2. DDS waits for every worker to reach that point, closes its current 
snapshot handle and iterator, then releases workers to submit requests.
   3. Workers retain their snapshot-GC locks until their requests complete.
   
   Snapshot task setup is serialized before the task-owned current handle is 
opened, preventing a second snapshot task from waiting while retaining such a 
handle. The worker barrier also handles a rejected executor submission during 
reconfiguration: DDS accounts for unscheduled workers, releases workers that 
already started, and retries the work in a later run.
   
   The patch adds a deterministic circular-wait regression with one snapshot DB 
lock stripe and one unflushed transaction. It also verifies that snapshot work 
retains the configured worker parallelism and that a rejected worker submission 
does not strand an accepted worker.
   
   Generated-by: Codex (GPT-5)
   
   ## What is the link to the Apache JIRA
   
   [HDDS-16164](https://issues.apache.org/jira/browse/HDDS-16164)
   
   ## How was this patch tested?
   
   - `mvn -pl :ozone-manager test -Dtest=TestDirectoryDeletingService 
-DskipShade -DskipRecon -DskipDocs` (6 tests passed)
   - `mvn -pl :ozone-manager -am install -DskipTests -DskipShade -DskipRecon 
-DskipDocs` (27-module reactor, 497 goals)
   - `mvn -pl :ozone-integration-test test 
-Dtest=TestDirectoryDeletingServiceWithFSO#testAOSKeyDeletingWithSnapshotCreateParallelExecution
 -DskipShade -DskipRecon -DskipDocs` (1 test passed)
   - `mvn -pl :ozone-manager checkstyle:check -DskipTests -DskipShade 
-DskipRecon -DskipDocs` (0 violations)
   - `git diff --check`


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