Skip to content

crosscluster: fix mixed-version RangeStats type mismatch#166349

Merged
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
kev-cao:crosscluster/mixed-version-rangestats
Mar 23, 2026
Merged

crosscluster: fix mixed-version RangeStats type mismatch#166349
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
kev-cao:crosscluster/mixed-version-rangestats

Conversation

@kev-cao
Copy link
Copy Markdown
Contributor

@kev-cao kev-cao commented Mar 21, 2026

PR #163427 extracted StreamEvent.RangeStats from streampb into rangescanstatspb.RangeStats. While the wire contents are identical, the nominal type changed, which causes pbtypes.UnmarshalAny type checks to fail. In a mixed 26.1/26.2 cluster, nodes pass around both types, blocking the resolved timestamp from progressing.

This commit adds back the streampb.StreamEvent.RangeStats message and uses it for marshaling DistSQL progress metadata until the cluster is fully on 26.2. The unmarshal path tries both types for compatibility in either direction.

Fixes: #164640

Release note: None

Co-Authored-By: roachdev-claude roachdev-claude-bot@cockroachlabs.com

@kev-cao kev-cao requested review from a team as code owners March 21, 2026 03:12
@kev-cao kev-cao requested review from dt and rharding6373 and removed request for a team March 21, 2026 03:12
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io bot commented Mar 21, 2026

😎 Merged successfully - details.

@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Mar 21, 2026

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@kev-cao kev-cao force-pushed the crosscluster/mixed-version-rangestats branch from 65cf3a1 to a3c2925 Compare March 23, 2026 14:36
@msbutler msbutler requested a review from jeffswenson March 23, 2026 15:07
@msbutler msbutler added the backport-26.2.x Flags PRs that need to be backported to 26.2 label Mar 23, 2026
Copy link
Copy Markdown
Collaborator

@jeffswenson jeffswenson left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you!

Comment thread pkg/repstream/streampb/stream.proto Outdated
PR cockroachdb#163427 extracted `StreamEvent.RangeStats` from `streampb` into
`rangescanstatspb.RangeStats`. While the wire contents are identical,
the nominal type changed, which causes `pbtypes.UnmarshalAny` type
checks to fail. In a mixed 26.1/26.2 cluster, nodes pass around both
types, blocking the resolved timestamp from progressing.

This commit adds back the `streampb.StreamEvent.RangeStats` message and
uses it for marshaling DistSQL progress metadata until the cluster is
fully on 26.2. The unmarshal path tries both types for compatibility in
either direction.

Fixes: cockroachdb#164640

Release note: None

Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
@kev-cao kev-cao force-pushed the crosscluster/mixed-version-rangestats branch from a3c2925 to 0b469d4 Compare March 23, 2026 17:38
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Mar 23, 2026

Detected infrastructure failure (matched: self-hosted runner lost communication with the server, self-hosted runner lost communication with the server). Automatically rerunning failed jobs. (run link)

Copy link
Copy Markdown
Collaborator

@msbutler msbutler left a comment

Choose a reason for hiding this comment

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

Nice!

@kev-cao
Copy link
Copy Markdown
Contributor Author

kev-cao commented Mar 23, 2026

TFTR!

/trunk merge

@trunk-io trunk-io bot merged commit c5154ed into cockroachdb:master Mar 23, 2026
36 of 38 checks passed
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Mar 23, 2026

Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches.


Issue #164640: branch-release-26.2.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

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.

roachtest: c2c/mixed-version failed

4 participants