Skip to content

Show CAS mount renewal progress in system.cas_mounts - #2513

Merged
filimonov merged 3 commits into
antalya-26.6-20261008from
fix/antalya-26.6/cas-mount-renewal-progress
Oct 15, 2026
Merged

filimonov merged 3 commits into
antalya-26.6-20261008from
fix/antalya-26.6/cas-mount-renewal-progress

Conversation

@filimonov

@filimonov filimonov commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

While a CAS mount lease renewal retries, system.cas_mounts showed nothing: an aging last_renewed_at, lifecycle still Live, and the attempt counters moved only after the call ended. An operator could not tell a renewal retrying through an object-store outage from a renewal thread that had died. Three columns now report the renewal as it runs.

Why it matters for the lease

The next change of the series (#2431) makes the renewal retry until the store gives a definitive answer, so a live holder will spend tens of seconds — or longer — inside one renewal call. Without these columns that pause has no visible sign of life; with them, SELECT lifecycle, renewal_in_progress, renewal_attempts, last_renewal_error FROM system.cas_mounts during an outage reads Live / 1 / 7 / "put gc/server-roots/…/mount: Timeout …". The same fields were the missing evidence in the incident analysis of #2431.

Changes

  • system.cas_mounts: renewal_in_progress (a renewal call is running), renewal_attempts (physical PUTs sent by the current call), last_renewal_error (verb, key and error class of the last refused request; no credentials, no bodies). Appended at the end; existing queries are unaffected. Documented in docs/en/operations/system-tables/cas_mounts.md.
  • Request engine: a RequestObserver with on_write_attempt and on_failure callbacks, called per sent attempt and per refused request.
  • Renewal thread: a RenewalProgress record under a leaf mutex (renewal_progress_mutex, never held across I/O or allocation beyond one string move); in_progress is reset by SCOPE_EXIT on every exit, exceptions included. CASMountRenewalAttempts/CASMountRenewalRetries are counted per attempt instead of from the result.
  • A local failure of the resolve read (not a request to the store) is not published.

Risks / notes

  • Nothing changes on the store or in the protocol. Cost: one leaf-mutex lock per attempt, at one renewal per cas_mount_renew_period_ms.
  • The system-table read copies the record under the lock and releases it before its own LIST of the slots.

Testing

  • Unit: the engine observer receives attempts and failures; renewalProgress follows the call and resets on an exception; the local-failure filter (red on the base: gtest_cas_request_observer.cpp, gtest_cas_mount_renewal_progress.cpp).
  • Integration: test_cas_mount_renewal_retry gains a scenario that reads the columns while RustFS is stopped.
  • CAS* gate: 2614 (release), 2618 (ASan, no error).

Related: #2431

Changelog category (leave one):

  • Improvement

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

system.cas_mounts gains renewal_in_progress, renewal_attempts and last_renewal_error, updated while a CAS mount lease renewal runs.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Updated docs/en/operations/system-tables/cas_mounts.md and docs/en/antalya/cas/architecture/mounts-and-leases.md.

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)

While a lease renewal retries, system.cas_mounts showed nothing: an aging
last_renewed_at, lifecycle still Live, and the attempt counters moved
only after the call ended. An operator could not tell a renewal retrying
through an object-store outage from a renewal thread that had died.

Add three columns updated as the renewal runs: renewal_in_progress,
renewal_attempts (physical PUTs sent by the current call) and
last_renewal_error (verb, key and error class of the last refused
request; no credentials, no bodies). The request engine gets a
RequestObserver with on_write_attempt and on_failure callbacks; the
renewal thread keeps a RenewalProgress record under a leaf mutex and
counts CASMountRenewalAttempts/Retries per attempt instead of from the
result. A local failure of the resolve read is not published. Nothing
changes on the store.

Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [ba17785]

k-morozov
k-morozov previously approved these changes Oct 12, 2026
filimonov and others added 2 commits October 14, 2026 23:47
Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@filimonov

Copy link
Copy Markdown
Member Author

Stateless tests (amd_asan_ubsan, cas s3 storage, parallel, 1/2): Server died with Logical error: GroupingAggregatedTransform pushed bucket A twice. The stack is in aggregation (MergingAggregatedMemoryEfficientTransform), no CAS frames; the same failure hits other PRs on this base. Not related to this PR. Tracked upstream: ClickHouse#115986

@filimonov
filimonov merged commit c147de3 into antalya-26.6-20261008 Oct 15, 2026
352 of 371 checks passed
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.

3 participants