mortalBibo commented on issue #62230:
URL: https://github.com/apache/doris/issues/62230#issuecomment-4211680118

   ## Fix scope clarification
   
   The fix (PR forthcoming) targets the **data scan path** of `OlapScanner` — 
the page-by-page read loop that drives bulk S3/OSS I/O and is the direct cause 
of the thread pool exhaustion described above.
   
   Specifically, `RuntimeState*` is injected into `IOContext` at 
`BetaRowsetReader` initialization and `OlapScanner`'s `score_runtime` 
collection path, enabling cancellation checks at two blocking boundaries:
   - `S3FileReader::read_at_impl()` retry loop (S3 429 backoff)
   - `CachedRemoteFileReader::read_at_impl()` FileBlock wait loop
   
   **Not covered by this fix** (pre-existing, not introduced):
   1. **In-flight synchronous S3 `GetObject()` requests** — cancellation is 
detected at the next retry/wait boundary, not mid-request.
   2. **Segment metadata reads during `Segment::open()`** (footer parse, column 
meta reads via `ColumnMetaAccessor` / `ExternalColMetaUtil`). These paths 
construct `IOContext` locally without `RuntimeState` access. Threading it 
through would require refactoring `Segment::open()` — a fundamental storage API 
used across compaction, write, and query paths. These reads are one-shot (not 
looped), cached by `SegmentLoader` LRU cache and `StoragePageCache`, protected 
by `DorisCallOnce`, and bounded by retry limits (~7s max), so they are 
structurally unable to cause the thread pool exhaustion described in this issue.
   3. **Broader stop-propagation semantics** (e.g., `FileScanner::try_stop()` 
for external table scanners).


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