Timo Theusner created FLINK-41437:
-------------------------------------
Summary: Wait until a cancelled materialized table refresh job has
stopped
Key: FLINK-41437
URL: https://issues.apache.org/jira/browse/FLINK-41437
Project: Flink
Issue Type: Sub-task
Components: Table SQL / Planner
Reporter: Timo Theusner
{{RefreshJobController#cancel}} returns once the JobMaster acknowledges the
cancel request, not when the job reaches {{CANCELED}}. After a failed {{ALTER
MATERIALIZED TABLE ... AS}} restart, the executor restarts the old refresh job
from its savepoint while the new job may still be cancelling, so both can
briefly write to the table. Cancel should return only once the job is in a
globally terminal state, bounded by {{client.timeout}}.
Proposed Changes
* Wait in {{RefreshJobController#cancel}} after the acknowledgement until the
job status is globally terminal, bounded by {{client.timeout}}
* Fail a cancel whose job is not terminal at the timeout with the existing
cancel timeout message and its "request may still complete" hint
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)