Repository navigation
Remove failpoint tests of table_readonly toggle windows and cancellation/timeout windows - #125008
Conversation
…ellation/timeout windows The job `Stateless tests (arm_asan_ubsan, azure, sequential)` hits its 9000 s timeout. Remove 32 tests that reproduce narrow windows of the `table_readonly` `ALTER` or of query cancellation/timeouts with server-global failpoints (median runtime about 457 s in total in this job). Fold the failpoint-free user-visible checks of `05212_readonly_storage_policy_toggle_rollback` and `05235_readonly_toggle_window_source_of_attach_partition` into a new test `05353_table_readonly_partition_source_and_combined_alter`. Related: #125003 Related: #125005 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [dfd259e] Summary: ✅
AI ReviewSummaryThis PR removes 31 failpoint-backed stateless tests to pull the sequential Findings
Final Verdict
|
| SELECT 'source parts while read-only', countIf(active), countIf(NOT active) | ||
| FROM system.parts WHERE database = currentDatabase() AND table = 'readonly_src'; | ||
|
|
||
| ALTER TABLE readonly_dst ATTACH PARTITION ID 'all' FROM readonly_src; |
There was a problem hiding this comment.
This new check only exercises ATTACH PARTITION ... FROM while the source is stably read-only. The deleted 05235_readonly_toggle_window_source_of_attach_partition was the only coverage for the two live-toggle windows (mt_alter_settings_pause_before_metadata_commit and mt_alter_readonly_pause_after_metadata_commit), where the source's locking and outdated-part loading behavior is different. If ATTACH PARTITION starts waiting for the source toggle to finish again, or if it begins loading the deferred outdated parts in those windows, this PR leaves us with no regression test for that hang/state-divergence.
Can we keep at least one failpoint-backed window case in a slower suite instead of dropping both?
There was a problem hiding this comment.
🕵 Not restoring 05235: removing failpoint tests that pause inside the live toggle windows (mt_alter_settings_pause_before_metadata_commit, mt_alter_readonly_pause_after_metadata_commit) is the purpose of this PR, because the sequential ASan job keeps hitting its timeout. There is no slower suite for stateless tests besides that job. The user-visible behavior — a stably read-only source of ATTACH PARTITION ... FROM and deferred outdated-parts loading after the toggle — is still covered by 05353. If the window cases are judged essential, that is a trade-off for a human reviewer.
…ack` It is the only regression test for the failed pre-commit path of a combined `MODIFY SETTING table_readonly = 0, storage_policy = ...`, where the `storage_policy` change can wake the move assignee before the metadata rollback. `05210_readonly_settings_rollback` already uses the same failpoint and runs in the sequential job, so keeping it costs about 9.5 s. The success path of the combined `ALTER` in `05353` duplicated the retry part of `05212`, so it is removed, and the test is renamed to `05353_table_readonly_attach_partition_source` to match what is left in it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rtition_source` It duplicates the retry part of the restored `05212_readonly_storage_policy_toggle_rollback`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| # metadata commit. The table is durably read-only until the commit succeeds, and the `ALTER` only | ||
| # holds `alter_lock`, which does not serialize with the `lockForShare` that the write paths take. A | ||
| # foreground query that passed `assertNotReadonly` in that window would modify a table whose failed | ||
| # commit restores `table_readonly = 1`, leaving new data on a durably read-only table. |
There was a problem hiding this comment.
This drops the only regression test for the pre-commit table_readonly 1 -> 0 window. StorageMergeTree::alter still relies on readonly_commit_in_flight to keep foreground writes rejected until the metadata commit actually succeeds or rolls back, because changeSettings has already published table_readonly = 0 in memory before then. After this deletion there is no test left for an INSERT or MOVE PARTITION TO TABLE slipping through that window and leaving new data on a table whose failed commit restores table_readonly = 1.
Please keep one failpoint-backed pre-commit write-rejection case here, even if it is reduced to a single entrypoint.
| } | ||
| trap cleanup EXIT | ||
|
|
||
| # A successful `table_readonly` 1 -> 0 toggle commits the setting before it restores the background |
There was a problem hiding this comment.
This removes the only regression test for the post-commit gap after table_readonly 1 -> 0, where the setting is already durable but the background workers and outdated-part loaders are not back yet. StorageMergeTree::alter explicitly keeps readonly_commit_in_flight set across mt_alter_readonly_pause_after_metadata_commit for exactly this reason. 05353 does not replace it because it only checks a stably read-only source table, not a destination command running in that post-commit gap.
Please keep one failpoint-backed MOVE PARTITION TO TABLE case for this window.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 9 s compile time in total, 7 of them have a recent master baseline. |
The job
Stateless tests (arm_asan_ubsan, azure, sequential)hits its 9000 s timeout: its median runtime on master grew from about 7900 s on 2026-10-01 to about 8700 s on 2026-10-09, and 7 of 22 master runs timed out on 2026-10-09.This removes 31 tests that reproduce narrow windows of the
table_readonlyALTER(rollback before the metadata commit, the post-commit tail, outdated parts loading while toggling) or of query cancellation/timeouts (urltable function,KILL QUERY, remote/parallel replicas cancellation,TRUNCATE DATABASE, outdated parts loading onDETACH), all by pausing or throwing at server-global failpoints. Together their median runtime in this job since 2026-10-01 is about 448 s.The tests which check the basic user-visible behavior of
table_readonlywithout failpoints are kept (03924,04062,04063,04321,04357,04490,04491,05183,05184,05185,05186,05191,05192,05219,05223), as are theurlcancellation/timeout tests that use only a local mock HTTP server and no failpoints.05212_readonly_storage_policy_toggle_rollbackis also kept, as the only regression test for the failed pre-commit path of a combinedMODIFY SETTING table_readonly = 0, storage_policy = .... The failpoint-free part of the removed05235(a read-only table as the source ofATTACH PARTITION ... FROM) is folded into a new test05353_table_readonly_attach_partition_source.Removed tests (median seconds):
05024_url_function_schema_inference_soft_timeout(40.3)04763_kill_query_merge_table_plan(37)05317_kill_query_totals_having(35.2)04741_cancel_skip_index_marks_remote_read(34.9)04839_parallel_replicas_cancel_before_announcement(27.5)05238_readonly_toggle_disables_workers_before_commit(24.1)05218_readonly_toggle_window_keeps_outdated_parts_unloaded(16.2)05221_readonly_rolled_back_toggle_tears_down_started_workers(15.5)05235_readonly_toggle_window_source_of_attach_partition(15.1)05217_readonly_toggle_window_keeps_workers_inert(12.4)05224_readonly_live_toggle_stops_queued_outdated_parts_loading(12)05220_readonly_live_toggle_suspends_outdated_parts_loading(11.9)04871_url_function_hard_cancel_upgrade_after_interrupted_read(11.8)05225_readonly_rolled_back_toggle_wakes_pending_workers(11.5)05228_load_outdated_parts_cancel_on_detach(11.1)05233_readonly_toggle_window_rejects_writes(10.4)03984_truncate_database_sync_cancellation(10.4)04516_mutation_kill_transaction_race(9.7)04765_kill_create_as_select_cleanup_drop(9.3)05222_readonly_rolled_back_toggle_after_assignee_task_created(9.3)05234_readonly_post_commit_window_rejects_partition_moves(9)05076_url_function_hard_timeout_after_pull(9)05211_readonly_start_workers_rollback(8.9)05054_url_function_hard_timeout_while_option_error_unwinds(8.9)05076_remote_query_executor_cancel_during_drain(8.2)04906_url_function_no_next_read_after_cancel(7.3)05048_url_function_killed_query_while_option_error_unwinds(6.5)04869_url_function_stale_metadata_error_after_soft_cancel(6.2)04846_url_function_no_second_metadata_probe_after_cancel(6.2)04891_url_function_no_initial_get_after_cancel(6.1)04904_url_function_no_chunk_after_cancel(6)The change is test-only. These failpoints are no longer used by any test:
http_read_buffer_pause_before_metadata_fallback,merge_tree_load_outdated_parts_pause,mt_alter_readonly_pause_after_metadata_commit,mt_alter_readonly_throw_in_start_background_workers,mt_alter_settings_pause_before_metadata_commit,mt_background_jobs_assignee_throw_after_task_created,mt_pause_before_loading_outdated_part,mt_pause_before_loading_queued_outdated_part,mt_pause_before_register_mutation,parallel_replicas_delay_announcement,remote_fs_gather_pause_in_read,remote_query_executor_cancel_in_finish_drain,storage_url_pause_after_pull,storage_url_pause_before_empty_file_probe,storage_url_pause_before_handling_interrupted_read_error,storage_url_pause_before_handling_option_error,storage_url_pause_before_read_buffer_creation,storage_url_pause_before_request_attempt,storage_url_pause_before_retry_attempt,storage_url_pause_between_metadata_probes,totals_having_transform_drop_cancelled_chunk,totals_having_transform_pause,truncate_database_tables_pause.Related: #125003
Related: #125005
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125008]
Version info
26.10.1.2012-master(included in26.10and later)