github-actions[bot] commented on code in PR #70173:
URL: https://github.com/apache/doris/pull/70173#discussion_r4690004884
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/IcebergRewriteExecutor.java:
##########
@@ -43,6 +44,13 @@ public IcebergRewriteExecutor(ConnectContext ctx,
IcebergExternalTable table,
super(ctx, table, labelName, planner, insertCtx, emptyInsert, jobId);
}
+ /** Bind the enclosing rewrite transaction after this group's sink has
been finalized. */
+ public void bindTransaction(long transactionId) throws UserException {
+ IcebergTransaction transaction = (IcebergTransaction)
transactionManager.getTransaction(transactionId);
Review Comment:
[P2] Register rewrite locations on the enclosing transaction
The shared rewrite transaction is created by `RewriteDataFileExecutor` on
its original manager, but each group captures the catalog's current manager in
`BaseExternalTableInsertExecutor`. If a catalog reset occurs after
`RewriteTableCommand`'s `planner.plan()` returns and before its executor is
constructed, that captured manager is null (or a replacement that has no shared
transaction). This new lookup then aborts `rewrite_data_files` with a null
dereference or "Can't find transaction", even though the enclosing transaction
and its retained lease are still valid. Previously this step only assigned the
existing transaction ID to the coordinator. Pass the enclosing
transaction/original manager into the group binding, or resolve that ID through
the existing global transaction registry.
--
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]