morrySnow commented on code in PR #64793:
URL: https://github.com/apache/doris/pull/64793#discussion_r3479084010
##########
be/src/exec/exchange/vdata_stream_recvr.h:
##########
@@ -198,7 +198,17 @@ class VDataStreamRecvr::SenderQueue {
void close();
- void set_dependency(std::shared_ptr<Dependency> dependency) {
_source_dependency = dependency; }
+ void set_dependency(std::shared_ptr<Dependency> dependency) {
Review Comment:
⚠️ **Data race on `_source_dependency`**: `_source_dependency = dependency;`
is assigned BEFORE acquiring `_lock`. Meanwhile, `set_source_ready()` reads
`_source_dependency` under the lock (via the `std::lock_guard&` parameter).
Another thread calling `decrement_senders` → `set_source_ready` could see a
stale or partially-written value. Move the assignment inside the lock scope.
--
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]