imay commented on a change in pull request #718: Clean timeout tablets channel 
in TabletWriterMgr
URL: https://github.com/apache/incubator-doris/pull/718#discussion_r264085329
 
 

 ##########
 File path: be/src/runtime/tablet_writer_mgr.cpp
 ##########
 @@ -311,6 +313,44 @@ Status TabletWriterMgr::cancel(const 
PTabletWriterCancelRequest& params) {
     {
         std::lock_guard<std::mutex> l(_lock);
         _tablets_channels.erase(key);
+        _key_time_map.erase(key);
+    }
+    return Status::OK;
+}
+
+Status TabletWriterMgr::start_bg_worker() {
+    _tablets_channel_clean_thread = std::thread([this] {
+                _tablets_channel_clean_thread_callback(nullptr);
+            });
 
 Review comment:
   you need to call `_tablets_channel_clean_thread.detach()` to avoid crush 
when process exits.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to