github-actions[bot] commented on code in PR #68385:
URL: https://github.com/apache/doris/pull/68385#discussion_r4092285447
##########
be/src/storage/txn/txn_manager.cpp:
##########
@@ -478,6 +480,15 @@ Status TxnManager::commit_txn(OlapMeta* meta, TPartitionId
partition_id,
{
std::lock_guard<std::shared_mutex>
wrlock(_get_txn_map_lock(transaction_id));
auto load_info = std::make_shared<TabletTxnInfo>(load_id, rowset_ptr);
+ // Publish workers attach their own memory context. Preserve the
writer's
+ // resource domain here; recovered/contextless transactions use the
default pool.
+ if (!is_recovery) {
+ SCOPED_INIT_THREAD_CONTEXT();
+ auto* ctx = thread_context();
+ if (ctx->is_attach_task()) {
Review Comment:
[P2] Preserve the LoadStream owner before relying on this attached-task
check. The local LoadStream close path hops to
`LoadStreamMgr::heavy_work_pool`, whose callback sets only the signal task ID.
`_pre_close()` temporarily attaches the stream's saved `ResourceContext`, but
that scope ends before `LoadStreamWriter::close()` calls `commit_txn()`, so
`is_attach_task()` is false here and `TabletTxnInfo::workload_group` remains
null. Normal or async multi-segment MoW publish then selects the global load
pool. This is a distinct remaining producer behind the already-reported
local-publish symptom: the transaction-state fix covers standard channel
commits, while this separate LoadStream handoff still drops the owner, and
`LocalPublishRetainsWorkloadGroup` commits directly inside
`SCOPED_ATTACH_TASK`. Please carry or attach the saved context through the
LoadStream commit (or pass the owner explicitly) and cover the actual
LoadStream close-to-publish 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]