harbor run -t openthoughts/tasktrove-openswe-tasks-patched-v5-oracle-success-openswe_oss-21021harbor download openthoughts/tasktrove-openswe-tasks-patched-v5-oracle-success-openswe_oss-21021The repository has not been cloned yet. Run the following command first to clone the repo, check out the target commit, and install dependencies:
bash /setup_files/setup.sh
The code will then be available at /testbed.
You are working on the repository Altinity/clickhouse-regression (instance: Altinity__clickhouse-regression-66).
The code is located in /testbed.
##65 Failure: arm-with-analyzer-25.3.8.23-zookeeper / alter_attach_partition_1 / alter_attach_partition_1 - ExpectTimeoutError: Timeout 300.000s during (f"OPTIMIZE TABLE {table_name} FINAL")
The test creates one source table (ReplicatedMergeTree) and two destination tables (MergeTree). It then performs a sequence of ATTACH / DETACH operations:
After these attach/detach/rename/attach sequences, the test runs OPTIMIZE TABLE on the corresponding tables.
In the failing workflow run, the error is a 300s timeout right after OPTIMIZE TABLE on the source table, at the step “attach partition from second destination table to source table”.
By checking the ClickHouse logs, we can see that the replica (clickhouse1) creates a merge log entry and adds it to its own replication queue, but the merge task (all_0_93_5) remains unprocessed for about 300 seconds, after which the server returns: Code: 341 — UNFINISHED: log entry <…> is not processed on local replica.
Basically, the failure is a timeout during OPTIMIZE TABLE on the source table (ReplicatedMergeTree) after a complex sequence of attach/detach/rename/attach partition operations involving three tables.
After running multiple tests across different environments (local x86, ARM server, GitHub Actions, with and without stress), I was not able to automatically reproduce the original timeout behavior that triggered the failure.
However, I was able to confirm that:
Code: 341 — UNFINISHED, exactly matching the error seen in the original workflow run.Running this scenario in isolation:
python3 -u alter/regression.py \
--only '/alter/attach partition/part 1/part level/part levels user example/*' \
--local --clickhouse docker://clickhouse/clickhouse-server:25.3.8.23-alpine \
--clickhouse-version 25.3.8.23-alpine --log only_test.log
the OPTIMIZE TABLE ... FINAL step normally completes in about 1 minute.
However, this does not reflect how the test behaves in CI/CD.
In CI, when executing feature.py, all 14 features under /alter/attach partition/part 1/ run in parallel, which significantly increases the load. Under this parallel execution, the same OPTIMIZE step typically takes more than 4 minutes:
python3 -u alter/regression.py \
--local --clickhouse docker://clickhouse/clickhouse-server:25.3.8.23-alpine \
--clickhouse-version 25.3.8.23-alpine --log only_test.log
This strongly suggests that during the failing CI run, the system experienced slightly higher resource load or disk latency, causing the merge associated with OPTIMIZE TABLE ... FINAL to exceed the 300s TestFlows timeout. Once the timeout was reached, the framework executed its cleanup step (DROP TABLE), and ClickHouse returned: Code: 341 — UNFINISHED
These findings explain the observed behavior and why it occurred only once.
The failure occurred because the OPTIMIZE TABLE ... FINAL operation exceeded the previous 300s timeout in CI/CD. To address this, the global timeout was increased to 600 seconds when using the --cicd flag. All CI/CD workflows now run the test suites with --cicd, ensuring that long-running operations under parallel load have enough time to complete without triggering false timeouts.
PR: Increase timeout to 600s when using --cicd (fixes #65)
https://github.com/Altinity/clickhouse-regression/actions/runs/19215068963/job/54966353182
Artifacts will be uploaded to https://altinity-test-reports.s3.amazonaws.com/index.html#clickhouse/25.3.8.23-alpine/19215068963/testflows/aarch64/with_analyzer/zookeeper/without_thread_fuzzer/alter1/attach_partition/ Review report at https://altinity-test-reports.s3.amazonaws.com/clickhouse/25.3.8.23-alpine/19215068963/testflows/aarch64/with_analyzer/zookeeper/without_thread_fuzzer/alter1/attach_partition/report.html Review new fails (nice) at https://altinity-test-reports.s3.amazonaws.com/clickhouse/25.3.8.23-alpine/19215068963/testflows/aarch64/with_analyzer/zookeeper/without_thread_fuzzer/alter1/attach_partition/nice-new-fails.log.txt
File "/home/ubuntu/_work/clickhouse-regression/clickhouse-regression/alter/../alter/table/attach_partition/part_names/common_steps.py",
line 125, in optimize_table
node.query(f"OPTIMIZE TABLE {table_name} FINAL")
File "/home/ubuntu/_work/clickhouse-regression/clickhouse-regression/alter/../helpers/cluster.py",
line 1147, in query
r = self.cluster.bash(self.name)(command, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
testflows.uexpect.uexpect.ExpectTimeoutError:
Timeout 300.000s for '(bash# )|(\n)'
2025.11.10 12:44:30.916856 [ 2322 ] {24dc20ca-a84d-4028-9abf-7dc798488789}
<Error> executeQuery: Code: 341. DB::Exception: Log entry log-0000000110 is not precessed on local replica, most likely because the replica was shut down. (UNFINISHED)
(version 25.3.8.23 (official build)) (from 127.0.0.1:37006) (query 1, line 1)
(in query: OPTIMIZE TABLE source_00959b68_be29_11f0_a763_920006b77660 FINAL ), Stack trace (when copying this message, always include the lines