morningman commented on issue #69783:
URL: https://github.com/apache/doris/issues/69783#issuecomment-6513670585
Two more gaps in the #67010 `compute_group` binding on branch-4.1 /
branch-4.2, found while reviewing the master port (#69749):
1. `ALTER ROUTINE LOAD ... PROPERTIES("compute_group" = "cg_b")` validates
`cg_b` (`AlterRoutineLoadCommand.checkJobProperties`) but never checks that the
job's `workload_group` exists in `cg_b`, and
`KafkaRoutineLoadJob.modifyProperties` has no workload group check on either
branch. CREATE does check it in the declared group (`CreateRoutineLoadInfo`). A
job created with `compute_group = cg_a` and `workload_group = wg_a`, where
`wg_a` exists only in `cg_a`, accepts the move. After RESUME, the first task
fails in `KafkaTaskInfo.rePlan` with `Can not find workload group wg_a in
compute croup cg_b`, the job is paused with the retryable `CREATE_TASKS_ERR`,
and auto resume repeats this indefinitely. Separately from #67010, an ALTER
that sets `workload_group` alone is not checked on master or branch-4.x either:
#50563 checked it in
`KafkaRoutineLoadJob.modifyProperties(AlterRoutineLoadStmt)`, the Nereids
`modifyProperties(AlterRoutineLoadCommand)` added by #49960 never had that
check, a
nd #53490 removed the statement path.
2. `MTMVTask` reads the MV's `compute_group` twice for each refresh context:
`setComputeGroup` binds the value read under one MV read lock, and
`checkComputeGroupBeforeTask` re-checks the value read under another
(`MTMVTask.java:430` and `:459` on branch-4.2, `:438` and `:467` on
branch-4.1). If an `ALTER MATERIALIZED VIEW` commits in between, the
pre-refresh check validates the new group while the refresh runs in the old
one. If the old group has just been dropped, that refresh fails later with a
generic no-backend error instead of `Compute group '<name>' not found.`. Data
is not affected.
The master port (#69749, commit `c9d9730047e`) checks the job's workload
group in the target group when an ALTER sets `compute_group`, using CREATE's
lookup as the job owner, and reads the MV's `compute_group` once per refresh
context to bind, record and re-check that value. An ALTER that sets
`workload_group` alone is left as it is there too.
--
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]