Skip to content

mmaprototype: add captured_at to cluster state snapshot#169741

Merged
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
tbg:mma-snapshot-captured-at
May 5, 2026
Merged

mmaprototype: add captured_at to cluster state snapshot#169741
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
tbg:mma-snapshot-captured-at

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented May 5, 2026

Add a top-level captured_at timestamp to ClusterStateSnapshot, populated from clusterState.ts (the same TimeSource MMA uses for its other timestamps). All time-typed fields in the snapshot (overload windows, last failed change, pending change start/gc/enacted-at) are absolute wall times, so consumers previously had to bring their own "now" to reason about whether a window is still active or how soon a change is about to be GC'd. Carrying the capture time alongside the rest of the state removes that ambiguity at negligible size cost.

Epic: none
Release note: None

Add a top-level captured_at timestamp to ClusterStateSnapshot, populated
from clusterState.ts (the same TimeSource MMA uses for its other
timestamps). All time-typed fields in the snapshot (overload windows,
last failed change, pending change start/gc/enacted-at) are absolute
wall times, so consumers previously had to bring their own "now" to
reason about whether a window is still active or how soon a change is
about to be GC'd. Carrying the capture time alongside the rest of the
state removes that ambiguity at negligible size cost.

Epic: none
Release note: None

Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
@tbg tbg requested review from a team as code owners May 5, 2026 12:53
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented May 5, 2026

😎 Merged successfully - details.

@tbg tbg requested a review from wenyihu6 May 5, 2026 12:53
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@tbg tbg added the backport-26.2.x Flags PRs that need to be backported to 26.2 label May 5, 2026
@tbg
Copy link
Copy Markdown
Member Author

tbg commented May 5, 2026

@wenyihu6 this is your commit from the other PR.

Copy link
Copy Markdown
Contributor

@wenyihu6 wenyihu6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/trunk merge

@trunk-io trunk-io Bot merged commit 7c25eaa into cockroachdb:master May 5, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-26.2.x Flags PRs that need to be backported to 26.2 target-release-26.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants