You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/01 05:07:54 UTC

[GitHub] [incubator-doris] dataroaring commented on a change in pull request #8761: fix write after free in OlapTableSink due to bad deconstruct order

dataroaring commented on a change in pull request #8761:
URL: https://github.com/apache/incubator-doris/pull/8761#discussion_r840233345



##########
File path: be/src/exec/tablet_sink.h
##########
@@ -332,25 +332,30 @@ class IndexChannel {
     OlapTableSink* _parent;
     int64_t _index_id;
 
-    // from backend channel to tablet_id
-    // ATTN: must be placed before `_node_channels` and `_channels_by_tablet`.
-    // Because the destruct order of objects is opposite to the creation order.
-    // So NodeChannel will be destructured first.
-    // And the destructor function of NodeChannel waits for all RPCs to finish.
-    // This ensures that it is safe to use `_tablets_by_channel` in the callback function for the end of the RPC.
+    // Members order here is error prone, DO NOT change it unless you are

Review comment:
       the _closed_lock fixes the problem, my code is not updated.




-- 
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-unsubscribe@doris.apache.org

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



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