Skip to content

fix: add user = currentUser() filter to system table queries#106

Merged
KeKs0r merged 1 commit intomainfrom
marc/backfill-user-filter
Mar 30, 2026
Merged

fix: add user = currentUser() filter to system table queries#106
KeKs0r merged 1 commit intomainfrom
marc/backfill-user-filter

Conversation

@KeKs0r
Copy link
Copy Markdown
Contributor

@KeKs0r KeKs0r commented Mar 30, 2026

Summary

  • Adds user = currentUser() filter to all 6 queries against system.processes and system.query_log across @chkit/clickhouse, @chkit/plugin-backfill, and @chkit/plugin-obsessiondb
  • Some ClickHouse Cloud instances enforce row-level security on system.query_log, causing queries without a user filter to fail with NOT_FOUND_COLUMN_IN_BLOCK (confirmed on the range environment via chcli)
  • The filter is a no-op on instances without row policies, so this is a safe defensive change

Test plan

  • bun verify passes (typecheck, lint, test, build)
  • Backfill plugin tests pass (109/109)
  • ObsessionDB plugin tests pass (57/57)
  • Verify backfill polling works on a live ClickHouse Cloud instance with row policies

🤖 Generated with Claude Code

Some ClickHouse Cloud instances enforce row-level security on
system.query_log, causing queries without a user filter to fail with
NOT_FOUND_COLUMN_IN_BLOCK. Adding the filter is a no-op on instances
without row policies and required on those with them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KeKs0r KeKs0r merged commit 45ff0fe into main Mar 30, 2026
2 checks passed
@KeKs0r KeKs0r deleted the marc/backfill-user-filter branch March 30, 2026 08:57
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.

1 participant