Caideyipi opened a new pull request, #18305:
URL: https://github.com/apache/iotdb/pull/18305
## Description
### Preserve fairness across temporary queue gaps
The TsFile parser scheduler removed a single-region Pipe from the waiting
order after admitting its only pending request. If that Pipe re-entered while a
multi-region Pipe still had queued requests, queue insertion order could give
the multi-region Pipe consecutive admissions. This change keeps a pipe-level
admission cursor across temporary gaps, advances it only for requests that
actually waited, and clears it once parser reservations and waiters are both
idle.
### Preserve scan parser state on critical OOM
A critical OOM while resizing memory for the next Tablet was handled by the
generic exception path, which closed the scan parser even though the current
data had not been consumed. The scan parser now propagates this retryable OOM
without closing so the caller can yield the parser slot and retry from the same
iterator position. Other exceptions retain the existing close-and-wrap behavior.
### Verification
- Added a scheduler regression test covering a single-region Pipe that
temporarily leaves and re-enters the waiting queue.
- Added a scan parser regression test that injects critical OOM during
`iterator.next()` and verifies the same iterator can subsequently produce the
event.
- `mvnw.cmd clean test -pl iotdb-core/datanode -am
-Dtest=PipeMemoryManagerTest,TsFileInsertionEventParserTest
-Dsurefire.failIfNoSpecifiedTests=false -DskipITs`
- `TsFileInsertionEventParserTest`: 21 run, 0 failures, 0 errors, 3
existing conditional skips.
- `PipeMemoryManagerTest`: 8 run, 0 failures, 0 errors.
- `mvnw.cmd -pl iotdb-core/datanode spotless:apply`
<hr>
This PR has:
- [x] been self-reviewed.
- [x] added comments explaining the intent where it would not be obvious.
- [x] added unit tests to cover the new code paths.
<hr>
##### Key changed/added classes
- `PipeMemoryManager`
- `TsFileInsertionEventScanParser`
- `PipeMemoryManagerTest`
- `TsFileInsertionEventParserTest`
--
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]