Skip to content

Commit c74f134

Browse files
branch-4.0: [log](insert-overwrite) Add log for insert overwrite auto detect begin #57418 (#57445)
Cherry-picked from #57418 Co-authored-by: zclllyybb <[email protected]>
1 parent 790fb72 commit c74f134

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,13 @@ public long registerTask(long dbId, long tableId, List<String> tempPartitionName
103103
*
104104
* @return group id, like a transaction id.
105105
*/
106-
public long registerTaskGroup() {
106+
public long registerTaskGroup(long tableId) {
107107
long groupId = Env.getCurrentEnv().getNextId();
108108
taskGroups.put(groupId, new ArrayList<Long>());
109109
taskLocks.put(groupId, new ReentrantLock());
110110
partitionPairs.put(groupId, Maps.newConcurrentMap());
111+
LOG.info("registered insert overwrite auto detect partition task group [" + groupId + "] for table "
112+
+ tableId);
111113
return groupId;
112114
}
113115

fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertOverwriteTableCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public void run(ConnectContext ctx, StmtExecutor executor) throws Exception {
210210
try {
211211
if (isAutoDetectOverwrite(getLogicalQuery())) {
212212
// taskId here is a group id. it contains all replace tasks made and registered in rpc process.
213-
taskId = insertOverwriteManager.registerTaskGroup();
213+
taskId = insertOverwriteManager.registerTaskGroup(targetTable.getId());
214214
// When inserting, BE will call to replace partition by FrontendService. FE will register new temp
215215
// partitions and return. for transactional, the replacement will really occur when insert successed,
216216
// i.e. `insertInto` finished. then we call taskGroupSuccess to make replacement.

0 commit comments

Comments
 (0)