Skip to content

Control the coalescing clock in the close test - #1085

Open
zlareb1 wants to merge 3 commits into
mainfrom
test/coalescer-close-clock
Open

zlareb1 wants to merge 3 commits into
mainfrom
test/coalescer-close-clock

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Related: #1066
Related: #1077

Changelog category

  • CI Fix or Improvement

Changelog entry

Not required.

Why

The close test assumes four scheduled writes enter one coalescing window. Scheduling pauses can split those writes into separate windows, leaving no batch for close to drain. Holding the loop clock still establishes the intended burst while the real close method remains responsible for flushing it.

Scope and risk

The existing ManualClock controls only this test's loop clock. All four writes, both scheduling yields, the close call and the original result and bulk-write assertion remain. Production coalescing, deadlines and transport behavior do not change.

The branch contains the erasure lease fixture from #1077, which is already merged. The merge result changes only the close test clock.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: revert the fixture change; no stored data or schema changes.

Tests

  • The natural CI failure returned four successful point writes but no bulk write. Exact submission timing and the host cause remain unknown.
  • Four focused cases passed: close flushes before the pool closes, the third set starts a bulk, window expiry resets the burst, and close waits for a first set queued behind a flush. Source pins stayed unchanged; the focused supervisor exited and was reaped.
  • Scoped Ruff lint, formatting and whitespace checks passed. Full exact-head hosted CI and fresh independent whole review are required before merge.
  • The dependency retains its separate three-case fixture regression and real Keeper qualification in hosted CI.
pytest -q tests/unit/test_sdk_set_coalescer.py::test_close_flushes_before_the_pool_closes tests/unit/test_sdk_set_coalescer.py::test_third_set_inside_the_window_starts_a_bulk tests/unit/test_sdk_set_coalescer.py::test_window_expiry_resets_the_burst_count tests/unit/test_sdk_set_coalescer.py::test_close_waits_for_a_first_set_queued_behind_a_flush

AI assistance in the code

  • AI-generated: Codex wrote the clock fixture and checked that the original close behavior and assertions remain.
  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full hosted CI passes on the final head.
  • Original inputs, assertions and production behavior are preserved.
  • No generated files, migrations or operator configuration changes.
  • Commits are signed off.

Keep all four submissions in the same logical window so the test exercises
close flushing pending writes before the transport closes. Preserve the
existing inputs, scheduling yields and result assertion.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Fenced memory inserts require a lease table in the selected schema. Give each fixture database its own Keeper root while preserving the replicated content checks.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
(cherry picked from commit 96be03c)
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@vercel

vercel Bot commented Nov 20, 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 20, 2026 11:44pm UTC

Request Review

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

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