Skip to content

fix(e2e): tolerate missing system.replicas grant in mv_replay - #226

Merged
KeKs0r merged 1 commit into
mainfrom
cursor/obsessiondb-replicas-access-denied-6923
Sep 28, 2026
Merged

KeKs0r merged 1 commit into
mainfrom
cursor/obsessiondb-replicas-access-denied-6923

Conversation

@KeKs0r

@KeKs0r KeKs0r commented Sep 28, 2026

Copy link
Copy Markdown
Member

Summary

#225 counts active replicas from system.replicas before the empty-target mv_replay e2e. ObsessionDB's managed role cannot SELECT that table (ClickHouse code 497 ACCESS_DENIED), so beforeAll failed before any chunk ran.

The harness still reads system.replicas when the grant exists, and still runs SYSTEM SYNC REPLICA … LIGHTWEIGHT on Shared/Replicated engines. A missing grant no longer fails the test: replica count falls back to one visibility sample, and sync is skipped only if that command is denied too. enable_parallel_replicas = 0 and the empty-chunk replay under a new plan id are unchanged.

Test plan

  • Unit tests cover code 497 / ACCESS_DENIED on the replica count and on SYSTEM SYNC REPLICA, and still require one sample per active replica when the count is readable
  • PR verify covers the single-node MergeTree path (that engine never queries system.replicas)
  • The obsessiondb job runs only on pushes to main, so this PR's CI will not prove the live path. After merge, watch that job. A green PR verify does not cover the denied-grant fallback against ObsessionDB.
Open in Web Open in Cursor 

ObsessionDB's managed role cannot SELECT system.replicas, so the replica
count added in #225 failed the empty-target e2e with ACCESS_DENIED.
Fall back to one visibility sample, skip SYSTEM SYNC REPLICA only when
that command is denied too, and keep parallel-replica disable plus
empty-chunk replay.

Co-authored-by: Marc Höffl <marc.hoeffl@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T15:22:16.738919Z 282be47 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@KeKs0r
KeKs0r merged commit 9632090 into main Sep 28, 2026
12 checks passed
@KeKs0r
KeKs0r deleted the cursor/obsessiondb-replicas-access-denied-6923 branch September 28, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants