imay commented on a change in pull request #2956: Add multi-thread ver olaptablesink for LOAD URL: https://github.com/apache/incubator-doris/pull/2956#discussion_r385501833
########## File path: be/src/exec/tablet_sink.h ########## @@ -141,26 +191,78 @@ class IndexChannel { std::unordered_map<int64_t, NodeChannel*> _node_channels; // from tablet_id to backend channel std::unordered_map<int64_t, std::vector<NodeChannel*>> _channels_by_tablet; + + int64_t _serialize_batch_ns = 0; + int64_t _wait_in_flight_packet_ns = 0; + + // BeId -> AddBatchCounter + std::unordered_map<int64_t, AddBatchCounter> _add_batch_counter_map; }; -// The counter of add_batch rpc of a single node -struct AddBatchCounter { - // total execution time of a add_batch rpc - int64_t add_batch_execution_time_ns = 0; - // lock waiting time in a add_batch rpc - int64_t add_batch_wait_lock_time_ns = 0; - // number of add_batch call - int64_t add_batch_num = 0; +// RowBuffer is used for multi-thread version of OlapTableSink, it's single-productor/single-consumer. +// In multi-thread version, OlapTableSink will create multi RowBuffers, and create the same number threads to exec RowBuffer::consume_process. +// Only one thread(OlapTableSink::send) exec push op, use modular hashing(node_id%buffer_num) to specify the buffer for which the row should be pushed into. +class RowBuffer { Review comment: This class can be moved into table_sink.cpp files ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org