Fix query hanging for ReplicatedMergeTree during OPTIMIZE and ALTER operations
Official CH changelog text
Fix waiting for OPTIMIZE and ALTER queries for ReplicatedMergeTree table engines. Now the query will not hang when the table was detached or restarted. #22118 (alesapin).