wangyong9999 commented on code in PR #194:
URL: https://github.com/apache/paimon-cpp/pull/194#discussion_r3793536260


##########
src/paimon/common/global_index/btree/btree_global_indexer.cpp:
##########
@@ -120,8 +123,9 @@ Result<std::shared_ptr<GlobalIndexReader>> 
BTreeGlobalIndexer::CreateReader(
         }
         read_buffer_size = static_cast<int32_t>(tmp_buffer_size);
     }
-    // TODO(lisizhuo.lsz): Allow users to specify an executor
-    std::shared_ptr<Executor> executor = CreateDefaultExecutor();
+    // Readers are created per payload group and may coexist for many buckets. 
Share the
+    // process-wide executor instead of creating a dedicated thread pool for 
every group.
+    std::shared_ptr<Executor> executor = GetGlobalDefaultExecutor();
     return std::make_shared<LazyFilteredBTreeReader>(read_buffer_size, files, 
key_type, file_reader,

Review Comment:
   Follow-up correction: each primary-key index group currently contains 
exactly one payload, and `UnionGlobalIndexReader` evaluates a single reader 
inline, so the scan-scoped executor could never receive work. It has been 
removed, and the PK path now explicitly passes `nullptr`. The four-argument 
BTree reader retains its pre-PR private four-thread executor behavior for 
`GlobalIndexScanImpl`; `global-index.thread-num` is not applied to the 
single-payload PK path.



-- 
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]

Reply via email to