HappenLee commented on code in PR #23639:
URL: https://github.com/apache/doris/pull/23639#discussion_r1309561513
##########
be/src/pipeline/pipeline.h:
##########
@@ -98,13 +127,13 @@ class Pipeline : public
std::enable_shared_from_this<Pipeline> {
private:
void _init_profile();
- std::atomic<uint32_t> _complete_dependency;
OperatorBuilders _operator_builders; // left is _source, right is _root
OperatorBuilderPtr _sink; // put block to sink
- std::vector<std::weak_ptr<Pipeline>> _parents;
- std::vector<std::shared_ptr<Pipeline>> _dependencies;
+ std::mutex _depend_mutex;
+ std::vector<std::pair<int, std::weak_ptr<Pipeline>>> _parents;
+ std::vector<std::pair<int, std::shared_ptr<Pipeline>>> _dependencies;
Review Comment:
the dependencies normally vary small,vector performance is better
##########
be/src/pipeline/pipeline.h:
##########
@@ -98,13 +127,13 @@ class Pipeline : public
std::enable_shared_from_this<Pipeline> {
private:
void _init_profile();
- std::atomic<uint32_t> _complete_dependency;
OperatorBuilders _operator_builders; // left is _source, right is _root
OperatorBuilderPtr _sink; // put block to sink
- std::vector<std::weak_ptr<Pipeline>> _parents;
- std::vector<std::shared_ptr<Pipeline>> _dependencies;
+ std::mutex _depend_mutex;
+ std::vector<std::pair<int, std::weak_ptr<Pipeline>>> _parents;
+ std::vector<std::pair<int, std::shared_ptr<Pipeline>>> _dependencies;
Review Comment:
the dependencies normally vary small,vector performance is better
--
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]