You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Caideyipi (via GitHub)" <gi...@apache.org> on 2026/10/21 08:23:16 UTC
[PR] Avoid subscription WAL segment reloads across prefetch slices [iotdb]
Caideyipi opened a new pull request, #18960:
URL: https://github.com/apache/iotdb/pull/18960
## Description
Follow-up to #18956. A subscription prefetch round can yield after its WAL entry or time budget and immediately continue in another round. Releasing its segment buffers at every yield reloads and decompresses the same segment even when each round consumes only one entry.
Retain normal and ordered-writer WAL buffers for `RESCHEDULE_NOW`. Release them when the queue delays, becomes dormant, or fails, preserving the direct-memory relief for paused queues. A genuine pause can still require reloading the current segment on resume. Ensure the queue read lock is released even if buffer cleanup fails.
## Validation
- Targeted queue, iterator, reader, and compression tests: 95 run, 0 failures/errors, 1 performance test skipped by default.
- The regression reads one physical entry per round from a real 128-entry WAL segment, covering UNCOMPRESSED and LZ4. It checks stable read bytes across all slices, exactly one LZ4 decompression, and delivery of all entries. A separate test covers delayed/dormant buffer release.
- Running the new regression against the previous implementation fails as expected: read bytes increase from 131,077 to 393,231 at an immediate continuation.
- Main sources and reactor dependencies compile on the latest master. Standard test compilation is blocked by the existing `SystemInfoTest` calling removed `DataRegionInfo.addStorageGroupMemCost` / `releaseStorageGroupMemCost` methods. For the targeted run, only that unrelated test was temporarily excluded from compilation; the POM was restored afterward.
This PR has:
- [x] been self-reviewed.
- [x] added comments explaining buffer retention and release.
- [x] added regression tests for the changed behavior.
Key changed class: `ConsensusPrefetchingQueue`.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid subscription WAL segment reloads across prefetch slices [iotdb]
Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 merged PR #18960:
URL: https://github.com/apache/iotdb/pull/18960
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org