Repository navigation
Conversation
|
Workflow [PR], commit [96360c0] Summary: ❌
AI ReviewSummaryThis PR requires an explicit acknowledgement before applying row policies to blending engines and their supported wrappers, checks creation and rename paths, and applies policies before Final VerdictStatus: ✅ Approve. All 13 focused row-policy tests passed in the head's Fast test report, covering the acknowledgement, wrappers, metadata access, refreshes, and |
970dd73 to
4e8fd95
Compare
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 63/63 (100.00%) · Uncovered code |
4e8fd95 to
eea2ce6
Compare
eea2ce6 to
90303df
Compare
…ending-engines # Conflicts: # ci/jobs/scripts/check_style/experimental_settings_ignore.txt # src/Interpreters/InterpreterCreateQuery.cpp
| if (!db) | ||
| return; | ||
|
|
||
| for (auto it = db->getTablesIterator(context, {}, /*skip_not_loaded=*/ true); it->isValid(); it->next()) |
There was a problem hiding this comment.
ON db.* is still bypassable while a database is loading asynchronously. IDatabase::getTablesIterator explicitly excludes not-yet-loaded tables when skip_not_loaded = true, and DatabaseOrdinary::getTablesIterator warns that DDL would otherwise miss tables entirely. That means a user can run CREATE ROW POLICY ... ON db.* during async_load_databases = 1 (or any other startup window with pending table loads), miss an existing SummingMergeTree / CoalescingMergeTree, and have the policy start applying to it as soon as startup finishes, without ever requiring allow_suspicious_row_policies_with_blending_engines = 1.
Could this iterate with skip_not_loaded = false, or otherwise re-check wildcard row policies before a late-loaded blending table is published?
There was a problem hiding this comment.
🕵 This gap exists only while the server loads the tables at startup. I do not fix it in this PR.
To close it, CREATE ROW POLICY ... ON db.* must call getTablesIterator with skip_not_loaded = false. Then DatabaseOrdinary::getTablesIterator waits until every table of the database loads, and waitLoad throws if one table fails to load. So the statement waits until the startup ends, and an unrelated broken table makes it fail. I think that is worse than the gap.
The setting is an acknowledgement for the user who runs the DDL. It is not a boundary against the user that the policy restricts. The docs say that a row policy is not a boundary on these engines, and the check covers the usual DDL paths.
There was a problem hiding this comment.
🕵 The docs now list this case as a limit of the check, in the section Engines which merge rows (commit 89a23d0): a table which the database did not load yet when the ON db.* policy is created is not checked. The code does not change, for the reasons in my earlier reply.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes312 object files changed (+204.31 KiB total), 1 added.
719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units727 translation units recompiled, 5966 s compile time in total, 726 of them have a recent master baseline. Translation units without a recent master baseline:
|
…ending-engines Move the `allow_suspicious_row_policies_with_blending_engines` entry of `SettingsChangesHistory` to the current 26.10 block (26.9 is released). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e nested table functions reuse names
…ending-engines # Conflicts: # src/Interpreters/InterpreterCreateQuery.cpp
`StorageMaterializedView::prepareRefresh` creates a copy of the target, and the check of `CREATE TABLE` rejected it when a policy `ON db.*` applied, because the background refresh context does not have `allow_suspicious_row_policies_with_blending_engines`. The copy has the engine of the target, so the policy was already accepted for it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-APPEND refreshable view with a non-replicated target CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=112817&sha=46a5dd1cf51db8f9292478ac9c9db2d359fcd90e&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20s3%20storage%2C%20DBReplicated%2C%20parallel%2C%201%2F2%29 PR: #112817
…ending-engines # Conflicts: # src/Processors/QueryPlan/ReadFromMergeTree.cpp # src/Storages/StorageMerge.h
…ending-engines # Conflicts: # src/Storages/StorageMaterializedView.cpp
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Creating or altering a row policy on a
SummingMergeTree,AggregatingMergeTree,CoalescingMergeTreeorGraphiteMergeTreetable now requiresallow_suspicious_row_policies_with_blending_engines = 1: merges put the values of hidden rows into the rows the policy shows. On these engines a row policy now applies beforeFINAL.Workflow [PR]
Sync PR [sync-upstream/pr/112817]