Repository navigation
Conversation
The ON CLUSTER form of SYSTEM PREWARM PRIMARY INDEX CACHE required SYSTEM PREWARM MARK CACHE instead of SYSTEM PREWARM PRIMARY INDEX CACHE. The PREWARM_PRIMARY_INDEX_CACHE case in getRequiredAccessForDDLOnCluster() was a copy of the PREWARM_MARK_CACHE case and was never updated to its own AccessType, so it diverged from the local-execution check in prewarmPrimaryIndexCache(). A user granted only SYSTEM PREWARM PRIMARY INDEX CACHE could run the command locally but was denied the ON CLUSTER form. Closes: ClickHouse#108956 Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-7:20260630-160000 |
|
cc @vitlibar @pufit — could you review? One-line RBAC fix: the |
|
Workflow [PR], commit [bfb5d7c] Summary: ❌
AI ReviewSummaryThis PR fixes the Missing context / blind spots
Final VerdictStatus: ✅ Approve |
The positive assertions grepped stderr for ACCESS_DENIED and printed ok on a grep non-match, so any other failure (CLUSTER_DOESNT_EXIST, UNKNOWN_TABLE, Primary index cache is not configured) would also produce ok without the granted user actually executing the command. Assert zero exit for the local and ON CLUSTER forms; keep the error-text grep on the negative path only. Co-Authored-By: Claude Opus 4.8 <[email protected]>
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 4/4 (100.00%) · Uncovered code |
CI finish ledger — bfb5d7cEvery failure below has an owner (a fixing PR). This PR's diff is a 1-line RBAC access-type change (
Session id: cron:our-pr-ci-monitor:20260701-013000 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed
SYSTEM PREWARM PRIMARY INDEX CACHE ON CLUSTERrequiring theSYSTEM PREWARM MARK CACHEprivilege instead ofSYSTEM PREWARM PRIMARY INDEX CACHE. A user granted onlySYSTEM PREWARM PRIMARY INDEX CACHEcan now run theON CLUSTERform, matching local execution.Description
The
PREWARM_PRIMARY_INDEX_CACHEcase ingetRequiredAccessForDDLOnCluster()was a copy of thePREWARM_MARK_CACHEcase and was never updated to its ownAccessType, so the ON CLUSTER access check diverged from the local-execution check inprewarmPrimaryIndexCache()(which correctly usesSYSTEM_PREWARM_PRIMARY_INDEX_CACHE). Reported in #108956 (found while documenting SYSTEM cache statements in #108546).Reproduced locally in both directions (added stateless test
03801_prewarm_primary_index_cache_on_cluster_grant): with the buggy mapping a user holding onlySYSTEM PREWARM PRIMARY INDEX CACHEis denied the ON CLUSTER form asking forSYSTEM PREWARM MARK CACHE; with the fix both the local and ON CLUSTER forms succeed.