github-actions[bot] commented on code in PR #65935:
URL: https://github.com/apache/doris/pull/65935#discussion_r3641882428
##########
be/src/format_v2/table/remote_doris_reader.cpp:
##########
@@ -98,14 +207,65 @@ class FlightRemoteDorisStream final : public
RemoteDorisStream {
}
private:
+ bool _is_cancelled() const {
+ return (_runtime_state != nullptr && _runtime_state->is_cancelled()) ||
+ (_io_ctx != nullptr && _io_ctx->should_stop);
Review Comment:
[P1] Synchronize the Flight watcher's stop signal
This read runs on the new `_cancellation_watcher` thread, while
`FileScannerV2::try_stop()` writes the same `IOContext::should_stop` member
from scanner shutdown. `should_stop` is a plain `bool`, and there is no lock or
atomic operation between those accesses, so the new cancellation path has a C++
data race. In particular, a blocked `Next()` is not guaranteed to observe
scanner-local stop promptly and can remain stuck until the query-sized Flight
deadline. Please publish this state through an atomic/synchronized signal (or
give the watcher its own synchronized cancellation flag) and have the
blocked-`Next()` test use that API.
--
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]