Repository navigation
Add test: RESTORE into non-empty temporary Memory table: old+new limit check untested - #124887
Conversation
Pre-PR validation: 6/6 ✅a) Deterministic repro? ✅ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ✅ f) Fix is general, not a narrow patch? ✅ |
c45181e to
086e8c9
Compare
|
Workflow [PR], commit [f3888c7] Summary: ✅ AI ReviewSummaryAdds focused stateless coverage for Final VerdictStatus: ✅ Approve. |
|
CI failure in |
|
No new PR is needed: both red checks on They come from run 37926788789, attempt 2, re-run on 2026-10-18. The run was created on 2026-10-09, and a re-run tests the original merge commit, Since the fixes merged, each of these failures ran on a tree without the fix: 4 for |
Stress runs with --replace-log-memory-with-mergetree rewrite ENGINE = Memory to MergeTree, which does not enforce max_temporary_table_memory_usage, so the expected TOO_MANY_BYTES on the first RESTORE never fires. Requested by @clickhouse-gh[bot] in ClickHouse#124887 (comment)
|
🕵 The only red check, |
|
🕵 Merged the latest |
Test-only PR. Review: are the gaps real, is the test right.
Adds test coverage for 1 untested code path, found during automated review of PR #124587.
That PR: (1)
RESTORE TEMPORARY TABLEnow enforces the temporary-table limits with theRESTOREquery's settings:StorageMemory::restoreDataImplchecksmax_temporary_table_memory_usageon existing + restored bytes;StorageMergeTree::attachRestoredPartschecks …1.
RESTOREinto non-empty temporaryMemorytable: old+new limit check untestedsrc/Storages/StorageMemory.cpp:749,src/Storages/StorageMemory.cpp:662Risk:
05339only restores into empty tables, so the existing-data term of the check is always 0.restoreDataImplchecksold_and_new_data->bytes(StorageMemory.cpp:749); checkingnew_bytesalone passes every current test. - Risk: a refactor that hoists the check above the copy of the old …Unique vs PR tests:
05339restores only into a table it just dropped, so the existing size is 0 and the old+new sum is never tested. This test restores into a non-empty table where each side fits and the sum does not. It uses theMemorybackup engine so it runs as.sql; it can go into05339if a separate file …Try it on ClickHouse Fiddle
cc @alexey-milovidov (author of #124587) — could you take a look, and add the
can be testedlabel if this looks good?Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes
Workflow [PR]
Sync PR [sync-upstream/pr/124887]
Version info
26.11.1.851-master(included in26.11and later)