kaijchen commented on code in PR #23019:
URL: https://github.com/apache/doris/pull/23019#discussion_r1295322877


##########
be/src/olap/delta_writer.cpp:
##########
@@ -66,7 +66,7 @@ DeltaWriter::DeltaWriter(WriteRequest* req, StorageEngine* 
storage_engine, Runti
                          const UniqueId& load_id)
         : _req(*req),
           _rowset_builder(*req, storage_engine, profile),
-          _memtable_writer(*req, profile),
+          _memtable_writer(new MemTableWriter(*req, profile)),

Review Comment:
   It's not easy to use shared_ptr for profile, because it's managed by 
internal object pool. All sub profile will share same life-cycle with the 
parent profile.
   
   Here's a workaround, I have removed dependency on profile except in 
`close_wait()`, which should not be called in MemTableMemoryLimiter anyways. 
9a9b368eb65575ebc497c7c18f9fd26e94ddd522



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to