Caideyipi opened a new pull request, #18262:
URL: https://github.com/apache/iotdb/pull/18262

   ## Description
   
   TsFile parser admission currently retries with a fixed sleep when Pipe 
memory is exhausted. Concurrent parser requests can therefore wake in lockstep, 
and a request may keep sleeping even after another parser releases its 
reservation.
   
   This PR changes parser admission retries to:
   
   - use bounded exponential backoff starting from 
`pipe_check_memory_enough_interval_ms`;
   - cap the interval at the initial interval multiplied by 
`pipe_memory_allocate_max_retries`;
   - add 50%-100% jitter to avoid synchronized retries;
   - wait on `PipeMemoryManager` so parser and Pipe memory releases wake 
admission attempts immediately;
   - preserve the existing overall parser admission timeout.
   
   This is independent of receiver/sink backoff in #18236, which does not cover 
parser admission. Fair scheduling across Pipes remains isolated in #18260.
   
   ### Tests
   
   - Verify exponential growth, overflow-safe capping, and jitter bounds.
   - Exhaust parser memory with a real TsFile parser request, configure a 
10-second retry interval, release one reservation, and verify the parser is 
notified and admitted within 3 seconds.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
       - [x] concurrent read and write
   - [x] added unit tests for parser admission backoff and release notification.
   
   <hr>
   
   ##### Key changed/added classes
   
   - `PipeTsFileInsertionEvent`
   - `PipeMemoryManager`
   - `PipeTsFileInsertionEventAdmissionTest`


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

Reply via email to