github-actions[bot] commented on code in PR #62282:
URL: https://github.com/apache/doris/pull/62282#discussion_r3069687718
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java:
##########
@@ -447,21 +447,31 @@ ExecutorFactory selectInsertExecutorFactory(
if (getLogicalQuery().containsType(InlineTable.class)) {
jobId = -1;
}
+ // Do not register internal group commit loads to
LoadManager.
+ // Internal group commit uses 'SELECT * FROM
group_commit(...)' as source,
+ // and the actual commit is managed by BE group commit
mechanism.
+ // These jobs will never transition to a completed state
through FE,
+ // causing a memory leak if registered.
+ if (getAllTVFRelation().stream().anyMatch(
+ rel ->
"group_commit".equals(rel.getFunctionName()))) {
Review Comment:
`UnboundTVFRelation#getFunctionName()` preserves the parser text
(`LogicalPlanBuilder.visitTableValuedFunction()` uses `ctx.tvfName.getText()`
directly), so TVF names are not normalized to lowercase here. Because SQL
function names are case-insensitive, `SELECT * FROM GROUP_COMMIT(...)` or other
mixed-case spellings will bypass this branch, still register an
`InsertLoadJob`, and keep the original leak for that path.
```suggestion
if (getAllTVFRelation().stream().anyMatch(
rel ->
"group_commit".equalsIgnoreCase(rel.getFunctionName()))) {
jobId = -1;
}
```
--
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]