Caideyipi opened a new pull request, #18976: URL: https://github.com/apache/iotdb/pull/18976
## Description `ConsensusPrefetchingQueue` manages delivery lifecycle indexes alongside WAL replay, writer ordering and prefetch scheduling. Extract a package-private `DeliveryLedger` that owns the five delivery indexes, in-flight ACK/NACK, requeue/recycle, payload reclamation, cleanup and compact replay descriptors. This is a behavior-preserving extraction. The queue keeps lifecycle validation and locking, the ready queue, WAL materialization, shared memory budgeting and retention publication. Delegates execute synchronously with the existing per-key `compute` and event-monitor scopes. ACK commits still run inside the in-flight computation, and retention refresh still runs after it. Replay encoding, resource-release order and externally visible interfaces are unchanged. The existing delivery test only follows the moved field through the ledger; all regression assertions are retained. ## Validation - `mvn -o spotless:apply -pl iotdb-core/datanode` — passed. - `mvn -o test-compile -DskipTests` — passed across all 53 reactor modules. - `mvn -o test-compile -P with-zh-locale -DskipTests` — passed across all 53 reactor modules. - `mvn -o test -pl iotdb-core/datanode -am '-Dtest=ConsensusPrefetchingQueue*Test,ConsensusSubscriptionCommitStateTest' '-Dsurefire.failIfNoSpecifiedTests=false'` — 122 tests run, 121 passed, 1 baseline failure. `ConsensusPrefetchingQueueTest.testAckRetentionRefreshDoesNotBlockEventRecycling` fails at line 2643 (`assertNotNull(event)`), before starting its ACK concurrency check. The identical failure was reproduced with the original queue compiled from `master @ 1b9e0713fb1`, using the same dependencies and unmodified test. The failure and its assertions are retained in this refactoring PR. The moved lifecycle bodies and replay descriptors were also compared against that baseline after substituting delegation calls and the logging owner. This PR has: - [x] been self-reviewed, including concurrent ACK/recycle, payload reclamation and seek/close fencing. - [x] preserved the existing regression assertions. Key changed classes: `ConsensusPrefetchingQueue`, `DeliveryLedger`, `ConsensusPrefetchingQueueDeliveryTest`. -- 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]
