AshinGau commented on code in PR #28223:
URL: https://github.com/apache/doris/pull/28223#discussion_r1423999146


##########
be/src/vec/exec/scan/scanner_context.h:
##########
@@ -272,6 +272,8 @@ class ScannerContext {
     // Not need to protect by lock, because only one scheduler thread will 
access to it.
     std::mutex _scanners_lock;
     std::list<VScannerSPtr> _scanners;
+    // weak pointer for _scanners, used in stop function
+    std::vector<VScannerWPtr> _scanners_ref;

Review Comment:
   Because `_scanners` will be popped/pushed/released when running, and 
`try_close` has no need for synchronization and consistency, only do the best 
effort, so there's no need to use `_scanners` with some lock operations.



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