Skip to content

Return the last Indeterminate when a CAS probe pause ends on the deadline - #2510

Merged
filimonov merged 1 commit into
antalya-26.6-20261008from
fix/antalya-26.6/cas-probe-sentinel-boundary
Oct 8, 2026
Merged

filimonov merged 1 commit into
antalya-26.6-20261008from
fix/antalya-26.6/cas-probe-sentinel-boundary

Conversation

@filimonov

@filimonov filimonov commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

probeSentinel threw "gave up at the policy deadline" when the jittered pause before a reissue ended exactly on the policy deadline, although a probe had already run and its outcome was known. The loop now keeps the last probe outcome and returns it when the deadline is reached after a probe.

Why it matters

The sentinel probe is the typed, cache-bypassing read of the keys whose presence is an authoritative fact about the pool (_pool_meta, the owner anchor, the mount slot). It never conflates a transport failure with absence: Indeterminate means "nothing is known", and every consumer treats it fail-closed. Turning a known Indeterminate into a give-up exception on the boundary loses that information: the caller cannot tell "no probe ran" from "a probe ran and was inconclusive". The pre-sleep check accepts a pause that ends exactly on the deadline (one millisecond out of the 0–5000 ms jitter draw), so about one reissue in five thousand hit the loop-head give-up instead — the cause of the rare failures of CASSentinelProbe.NativeClassifiesUnmodeledErrorAsIndeterminate.

Changes

  • CasOperation::probeSentinel keeps last_probe; at the loop head, a reached deadline returns it when a probe has run and throws giveUpReadDeadline as before when none has.
  • The admission gate (a lost fence, no lease budget) still throws at any attempt; no request is sent after the deadline.
  • The header comment states the admission rule as the code applies it.

Testing

  • Regression test with an injected clock and a zero reservation: the pause lands exactly on the deadline; the outcome is Indeterminate, no request is sent after the deadline. Red on the base: gave up at the policy deadline after 1 attempt(s).
  • Two behaviour-preservation tests: a refusal after a pause on the deadline still throws; a deadline with no probe still throws.
  • CASSentinelProbe.NativeClassifiesUnmodeledErrorAsIndeterminate: 100,000 repeats, 0 failures.
  • CAS* gate: 2611 (release), 2615 (ASan, no error).

Closes backlog task CAS-325.

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

The CAS sentinel probe returns its last inconclusive outcome instead of throwing when a retry pause ends exactly on the policy deadline.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

probeSentinel reissues an Indeterminate probe after a jittered pause and
decides before sleeping whether the pause plus one request still fits the
policy deadline. The check accepts a pause that ends exactly on the
deadline; the loop head then saw the deadline reached and threw
"gave up at the policy deadline" although a probe had run and its outcome
was known. One pause in about five thousand landed there, which showed as
a rare failure of CASSentinelProbe.NativeClassifiesUnmodeledErrorAsIndeterminate.

Keep the last probe outcome and return it when the deadline is reached
after a probe; the admission gate (a lost fence, no lease budget) still
throws at any attempt, and a deadline reached before the first probe still
throws. No request is sent after the deadline.

Closes backlog task CAS-325.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Workflow [PR], commit [58debc8]

@filimonov
filimonov merged commit 78cad40 into antalya-26.6-20261008 Oct 8, 2026
300 of 316 checks passed
@svb-alt svb-alt added the port-antalya PRs to be ported to all new Antalya releases label Oct 11, 2026
zvonand pushed a commit that referenced this pull request Oct 12, 2026
…tinel-boundary

Return the last Indeterminate when a CAS probe pause ends on the deadline

Source-PR: #2510 (#2510)
@k-morozov k-morozov added the verified Approved for release label Oct 15, 2026
@zvonand zvonand removed the port-antalya PRs to be ported to all new Antalya releases label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants