imbajin commented on PR #3140:
URL: https://github.com/apache/hugegraph/pull/3140#issuecomment-5422487240

   ⚠️ **Important — keep ordered-scan initialization fail-fast after the 
eight-worker pool is saturated**
   
   `OrderedKvIterator.initialize()` currently submits every Store first-entry 
task before reading any completion. The shared initializer uses eight workers, 
a `SynchronousQueue`, and `CallerRunsPolicy`; once all workers are busy, the 
next `submit()` can execute `firstEntry()` on the query/coordinator thread. If 
that Store blocks, an earlier Store failure may already be queued but cannot be 
observed, so cancellation and stream cleanup are delayed.
   
   **Before**
   ```text
   submit Store 1..8 -> worker pool
   submit Store 9    -> coordinator runs it inline and blocks
   Store 2 fails     -> failure waits unobserved in completion queue
   ```
   
   **After**
   ```text
   submit at most 8 -> wait for one completion
   completion fails -> cancel and close immediately
   completion succeeds -> submit the next Store and keep the window full
   ```
   
   The fix should keep at most eight first-entry tasks in flight, drain one 
completion before submitting another Store, and avoid caller-thread execution 
when the shared pool is saturated. A 9-Store regression should cover one early 
failure plus one blocked source.


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