Flaky under load: notes save_outside_retry (Home release) and store a_once_commit flush_activity #1166

Open
opened 2026-11-15 21:17:54 +00:00 by kayg · 0 comments
Owner

Two Rust unit tests fail now and then under load on dev-01. Both fail on dev 42c219afd as well as on the #1011 head, so per the flaky rule they don't block #1011; this issue is for the stability fix.

Where seen: cargo test -j4 --workspace --locked --no-fail-fast for #1011 at 72c613833 on dev-01, 16 Nov ~02:00 IST, during the daily train (load average 24–35 on 12 cores).

Test #1011 head 72c613833 dev 42c219afd
calternal-notes tests::event_visibility::save_outside_retry 5 / 30 runs failed 3 / 29 runs failed
calternal-store tests::restore::a_once_commit_does_not_update_flush_activity 1 / 10 0 / 10 (store code is identical on both)

Runs alternated head/dev in the same slot queue (cargo test -j4 --locked -p <crate> --lib <test> -- --exact).

Failures

  • save_outside_retry (crates/notes/src/tests/clients.rs:202): timed out waiting for: fault-test Home releases its databases. The test loops retry_after_metadata_failure 20 times and gives the last Arc<Home> 5 s to drop after the env, engine and live stream are dropped. On a busy host something (engine/room tasks still finishing) holds the Home past 5 s.
  • a_once_commit_does_not_update_flush_activity (crates/store/src/tests/restore.rs:662): last_save_ns was 1 before commit_once and 820341 after. The flush worker seems to record activity between the two snapshots, so the test races it.

Likely fixes: for the first, wait for the Home with a longer bound (or wait for the engine's tasks to finish before measuring); for the second, take both snapshots with the flush worker idle (or quiesce it in the test) instead of assuming it never runs in between.

Two Rust unit tests fail now and then under load on dev-01. Both fail on dev `42c219afd` as well as on the #1011 head, so per the flaky rule they don't block #1011; this issue is for the stability fix. **Where seen:** `cargo test -j4 --workspace --locked --no-fail-fast` for #1011 at `72c613833` on dev-01, 16 Nov ~02:00 IST, during the daily train (load average 24–35 on 12 cores). | Test | #1011 head `72c613833` | dev `42c219afd` | |---|---|---| | `calternal-notes` `tests::event_visibility::save_outside_retry` | 5 / 30 runs failed | 3 / 29 runs failed | | `calternal-store` `tests::restore::a_once_commit_does_not_update_flush_activity` | 1 / 10 | 0 / 10 (store code is identical on both) | Runs alternated head/dev in the same slot queue (`cargo test -j4 --locked -p <crate> --lib <test> -- --exact`). **Failures** - `save_outside_retry` (`crates/notes/src/tests/clients.rs:202`): `timed out waiting for: fault-test Home releases its databases`. The test loops `retry_after_metadata_failure` 20 times and gives the last `Arc<Home>` 5 s to drop after the env, engine and live stream are dropped. On a busy host something (engine/room tasks still finishing) holds the Home past 5 s. - `a_once_commit_does_not_update_flush_activity` (`crates/store/src/tests/restore.rs:662`): `last_save_ns` was 1 before `commit_once` and 820341 after. The flush worker seems to record activity between the two snapshots, so the test races it. **Likely fixes:** for the first, wait for the Home with a longer bound (or wait for the engine's tasks to finish before measuring); for the second, take both snapshots with the flush worker idle (or quiesce it in the test) instead of assuming it never runs in between.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#1166
No description provided.