Repository navigation
Speed up CAS unit tests; fix a GC drain race in an integration test - #2958
Merged
Merged
Conversation
43 of 5,188 tests took 205 of the suite's 272 s, nearly all of it real time spent waiting. Under MSan the unit job ran out of its 90 minutes. - A successor mount waited out its predecessor's lease for 40 s: the test now passes the boot clock and the wait function it already had hooks for. - Five scheduler tests waited through eight deferred rounds of an idle pool: they run with no deferral and request the round at once. The "an operator stop persists" check could not fire before, because a wrongly restarted scheduler logged `Deferred`, never `Success`. - Three `cas-fsck` deadline tests use the virtual retry clock their siblings use. - "Has not returned yet" windows are 300 to 500 ms instead of 2 s. - A dying death-test child is dumped through the kernel's core handler even with a zero core limit when `core_pattern` is a pipe, about a second per death. `CAS_EXPECT_DEATH` and `CAS_ASSERT_DEATH` make only that child non-dumpable; the test binary itself stays dumpable. Test-only. No assertion is removed. Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
9 of 30 tasks
The nightly ASan run failed all five copy-then-drop cases with `GC did not drain in 200 rounds`. The drain counts only its own non-deferred quiet rounds, but manual and scheduled rounds share one deferral counter, and the fold goes to the ninth round. In CI the scheduler started a round every ~1.1 s and the manual loop every ~1.3-1.4 s, so the ninth round was always the scheduler's; the manual run that arrived during the fold waited on the round mutex and became deferral number one, which repeated the cycle. Every fold found nothing to do, yet the drain never saw one. `drain_gc` now stops the scheduler and starts it again in `finally`, so every ninth manual round folds. https://altinity-build-artifacts.s3.amazonaws.com/json.html?REF=antalya-26.8&sha=9be3ad607ce760b0070910ef856b72a0cbb55d1b&name_0=MasterCI Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
filimonov
marked this pull request as ready for review
November 25, 2026 15:55
5 of 31 tasks
k-morozov
approved these changes
Nov 25, 2026
Collaborator
|
No medium/high defects found by AI audit. No CI fails are PR-caused. PR fixes tests, does not touch src code; no extra regression tests needed. |
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cut the CAS unit suite from 272 s to about 113 s of test time. 43 of 5,188 tests took 205 s, nearly all of it spent waiting, and under MSan the unit job ran out of its 90 minutes, which dropped the jobs that depend on it in PR 2941.
cas-fsckdeadline tests use the virtual retry clock their siblings use.core_patternis a pipe, about a second per death.CAS_EXPECT_DEATHandCAS_ASSERT_DEATHmake only that child non-dumpable.Test-only. No assertion is removed in either change.
Local gates on this exact tree (Rust off):
CAS*:ReadBufferFromS3SessionRelease*:S3BulkDeleteFallback*:ReadBufferFromFileView*, release 5188/5188 passed in 112.7 s; ASan + UBSan 5189 passed, 2 skipped (CASDecodeErrors.AMemoryLimit..., memory-tracker tests skipped under sanitizers) in 409.9 s.Also fixes
test_cas_cross_table_copy_gc, which failed all five copy-then-drop cases in the 2026-11-24 nightly (ASan, db disk, old analyzer) withGC did not drain in 200 rounds. Manual and scheduled GC rounds share one deferral counter and the ninth round folds. In CI the scheduler started a round every ~1.1 s and the drain's manual loop every ~1.3-1.4 s, so the ninth round was always the scheduler's, and the manual run arriving during the fold waited on the round mutex and became deferral number one again. The drain counts only its own non-deferred rounds and never saw one, although every fold found nothing to do.drain_gcnow stops the scheduler for the drain. Locally, release and ASan: 8/8. The failure did not reproduce locally (it depends on the exact timings); the cycle is read from the CI server log.Nightly report: https://altinity-build-artifacts.s3.amazonaws.com/json.html?REF=antalya-26.8&sha=9be3ad607ce760b0070910ef856b72a0cbb55d1b&name_0=MasterCI
Related: #2941
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Not required.
Documentation entry for user-facing changes
None.
CI/CD Options
Exclude tests:
Regression jobs to run: