[fix](Nereids) insert into target table lock should include finalize (#28085)

This commit is contained in:
morrySnow
2023-12-07 20:15:12 +08:00
committed by GitHub
parent 65fc2e0438
commit f37215a32a

View File

@ -155,12 +155,12 @@ public class InsertIntoTableCommand extends Command implements ForwardWithSync,
physicalOlapTableSink.getDatabase(),
physicalOlapTableSink.getTargetTable(), label, planner);
insertExecutor.beginTransaction();
insertExecutor.finalizeSink(sink, physicalOlapTableSink.isPartialUpdate(),
physicalOlapTableSink.isFromNativeInsertStmt());
} finally {
targetTableIf.readUnlock();
}
insertExecutor.finalizeSink(sink, physicalOlapTableSink.isPartialUpdate(),
physicalOlapTableSink.isFromNativeInsertStmt());
executor.setProfileType(ProfileType.LOAD);
// We exposed @StmtExecutor#cancel as a unified entry point for statement interruption
// so we need to set this here