yiguolei commented on code in PR #42053:
URL: https://github.com/apache/doris/pull/42053#discussion_r1808114319


##########
be/src/olap/delta_writer.h:
##########
@@ -104,6 +104,10 @@ class BaseDeltaWriter {
     WriteRequest _req;
     std::unique_ptr<BaseRowsetBuilder> _rowset_builder;
     std::shared_ptr<MemTableWriter> _memtable_writer;
+    // load channel(memtable not on sink) may submit flush task to workload 
group's flush pool,
+    // but load channel may not register a query ctx which means workload 
group may be deconstruct when submit flush task.
+    // so we hold workload group's shared_ptr here to guarantee flush pool not 
be destroyed when load channel running.
+    std::shared_ptr<WorkloadGroup> _wg_sptr {nullptr};

Review Comment:
   任何地方都不能保存workload group的shared ptr,shared ptr的保存,只能在workload group 
manager里,其他地方只能存放weak ptr



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