buraksenn opened a new pull request, #20802: URL: https://github.com/apache/datafusion/pull/20802
## Which issue does this PR close? Related to #18138 but does not close any issue. ## Rationale for this change TimeToFirstItemStream held an Arc<Mutex<Vec<RequestDetails>>> and a request_index to write back the duration into the shared request list. I saw @alamb and @BlakeOrth's reviews on the PR #19127 about the improvements and wanted to change. ## What changes are included in this PR? - Replace Arc<Mutex<Vec<RequestDetails>>> + index in TimeToFirstItemStream with a per-request Arc<AtomicU64> - Store duration as nanoseconds in AtomicU64 (0 = not yet set) with Release/Acquire ordering - Start the timer lazily on the first poll_next call instead of at stream creation, so only actual storage latency is measured ## Are these changes tested? Existing tests and I've also added time comparison ## Are there any user-facing changes? No -- 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]
