Skip to content

Conversation

@sumeerbhola
Copy link
Collaborator

An ExternalRangeChange does not have the currently mutable fields of PendingRangeChange (and the set of mutable fields is going to expand in the near future). Todos related to limitation of viewing a change as a "change replicas" or "lease transfer" etc., are moved to ExternalRangeChange, so compartmentalized to methods that are called by integration code outside the mma package.

There is still some potential future cleanup involving unexporting PendingRangeChange, which is not in scope for this PR.

The PendingRangeChange becomes a temporary container for a slice of []*pendingReplicaChanges. Printing this struct no longer involves viewing it as a "change replicas" or "lease transfer". Furthermore, the ReplicaChange.replicaChangeType field is removed and the change type is now a function of prev and next. This sets us up for making prev mutable in a future PR.

Informs #157049

Epic: CRDB-55052

Release note: None

@sumeerbhola sumeerbhola requested review from tbg and wenyihu6 November 20, 2025 18:53
@sumeerbhola sumeerbhola requested review from a team as code owners November 20, 2025 18:53
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator Author

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

This will precede #158024

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @tbg and @wenyihu6)

An ExternalRangeChange does not have the currently mutable fields of
PendingRangeChange (and the set of mutable fields is going to expand in
the near future). Todos related to limitation of viewing a change as a
"change replicas" or "lease transfer" etc., are moved to
ExternalRangeChange, so compartmentalized to methods that are called by
integration code outside the mma package.

There is still some potential future cleanup involving unexporting
PendingRangeChange, which is not in scope for this PR.

The PendingRangeChange becomes a temporary container for a slice of
[]*pendingReplicaChanges. Printing this struct no longer involves viewing
it as a "change replicas" or "lease transfer". Furthermore, the
ReplicaChange.replicaChangeType field is removed and the change type
is now a function of prev and next. This sets us up for making prev
mutable in a future PR.

Informs cockroachdb#157049

Epic: CRDB-55052

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants