github-actions[bot] commented on code in PR #62282:
URL: https://github.com/apache/doris/pull/62282#discussion_r3070763980
##########
regression-test/suites/load_p0/http_stream/test_group_commit_http_stream.groovy:
##########
@@ -251,6 +251,10 @@ suite("test_group_commit_http_stream") {
getRowCount(19)
qt_sql " SELECT * FROM ${tableName} order by id, name, score asc; "
+
+ // group commit http stream (SELECT * FROM http_stream(...)) should
not register load jobs
+ def showLoadResult = sql """ SHOW LOAD FROM ${db} """
+ assertEquals(0, showLoadResult.size())
Review Comment:
This regression does not cover the new branch in this PR. `SELECT * FROM
http_stream(...)` already goes through the existing `ctx.isGroupCommit()` path
and never reaches `containsInternalGroupCommitTvf()`. To protect the actual
fix, the test needs a case that exercises the `group_commit(...)` TVF source
path that now forces `jobId = -1`.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java:
##########
@@ -447,21 +447,30 @@ 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 (containsInternalGroupCommitTvf()) {
+ jobId = -1;
Review Comment:
`containsInternalGroupCommitTvf()` is broader than the internal-only case
described in the comment. Any normal insert query that happens to contain a
`group_commit(...)` TVF will now force `jobId = -1`, which suppresses load-job
registration and changes `SHOW LOAD` / persisted load-job behavior for that
query as well. This should be keyed off the real internal group-commit signal
(for example the parser's `DMLCommandType.GROUP_COMMIT` / `tableId` path), not
a function-name match anywhere in the query tree.
--
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]