bobhan1 commented on code in PR #19917:
URL: https://github.com/apache/doris/pull/19917#discussion_r1233885829
##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -1049,6 +1175,18 @@ Status VOlapTableSink::prepare(RuntimeState* state) {
return Status::InternalError("unknown destination tuple descriptor");
}
+ for (size_t idx = 0; idx < _output_tuple_desc->slots().size(); idx++) {
+ if (_output_tuple_desc->slots()[idx]->is_auto_increment()) {
+ _auto_inc_col_idx = idx;
+ _auto_inc_id_buffer =
GlobalAutoIncBuffers::GetInstance()->get_auto_inc_buffer(
Review Comment:
There may be multiple `VOlapTableSink`s on one BE writing to the same table
concurrently. Sharing a global buffer between these `VOlapTableSink`s can
reduce the number of RPCs
##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -964,6 +974,122 @@ void VNodeChannel::mark_close() {
_eos_is_produced = true;
}
+FetchAutoIncIDExecutor::FetchAutoIncIDExecutor() {
+ ThreadPoolBuilder("AsyncFetchAutoIncIDExecutor")
+ .set_min_threads(config::auto_inc_fetch_thread_num)
+ .set_max_threads(config::auto_inc_fetch_thread_num)
+ .set_max_queue_size(std::numeric_limits<int>::max())
+ .build(&_pool);
+}
+
+AutoIncIDRequestHandlerExecutor::AutoIncIDRequestHandlerExecutor() {
+ ThreadPoolBuilder("AutoIncIDRequestHandlerExecutor")
Review Comment:
One for RPC and the other for handling requestss from `VOlapTableSink`.
Putting these two kinds of threads in one thread pool may cause deadlock.
--
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]