Skip to content

The Postgres batching test flushes only the query log - #1495

Open
zlareb1 wants to merge 1 commit into
mainfrom
fix/ci-pg-batch-query-log
Open

zlareb1 wants to merge 1 commit into
mainfrom
fix/ci-pg-batch-query-log

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Related: #1487

Changelog category

  • CI Fix or Improvement

Changelog entry

Omitted for a test-only change.

Why

The Postgres batching test flushes every system log before it reads system.query_log. A trace log flush can time out after all 20 writes have already reached ClickHouse. Failed Postgres 18 storage job

Scope and risk

Flush the query log that supplies the assertion. The test still checks that all 20 rows reached ClickHouse and that the publisher used fewer than 20 inserts.

Compatibility, rollout and rollback

Operator steps are unnecessary. Revert the test commit to roll back.

Tests

  • Ran pytest -q tests/integration/test_pg_authority.py::test_writes_made_together_share_their_clickhouse_inserts on clean main using ClickHouse 26.11.2.4 and Postgres 18. A temporary materialized view on the private trace log delayed its writes and reproduced the CI error, code 159. The same test passed after the change while the trace log was still delayed.
  • make format-check lint typecheck passed locally. The full suites run in CI.

AI assistance in the code

  • AI-generated. Codex wrote the test change and ran the checks above.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Local format, lint, type checks and focused tests pass.
  • Commit is signed off.

Note

Low Risk
Test-only change that targets one integration assertion; no production behavior.

Overview
Fixes a CI flake in test_writes_made_together_share_their_clickhouse_inserts by narrowing the ClickHouse flush before counting pg_batch.flush inserts.

The test now runs SYSTEM FLUSH LOGS query_log instead of flushing every system log. Only system.query_log is needed for the assertion, so unrelated trace-log flushes (which could time out after data was already published) no longer fail the run.

Reviewed by Cursor Bugbot for commit ec8cbfd. Bugbot is set up for automated code reviews on this repo. Configure here.

The batching assertion reads the query log. An all-log flush can time out on a trace log that the assertion never reads.

Signed-off-by: Lareb Zafar <[email protected]>
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 25, 2026 8:41pm UTC
loom-telemetry Ready Ready Preview Nov 25, 2026 8:41pm UTC

Request Review

This branch has not been deployed

No deployments
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