Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.2: kvserver,clusterversion: {version,feature}-gate lease upgrade logic #88624

Merged

Conversation

irfansharif
Copy link
Contributor

@irfansharif irfansharif commented Sep 23, 2022

Backport 1/1 commits from #88408 (amends #88613).

/cc @cockroachdb/release


Informs #88301. EnableLeaseUpgrade version gates a change in the lease transfer protocol whereby we only ever transfer expiration-based leases (and have recipients later upgrade them to the more efficient epoch based ones). This was done to limit the effects of ill-advised lease transfers since the incoming leaseholder would need to recognize itself as such within a few seconds. This needs version gating so that in mixed-version clusters, as part of lease transfers, we don't start sending out expiration based leases to nodes that (i) don't expect them for certain keyspans, and (ii) don't know to upgrade them to efficient epoch-based ones.

While here, we also introduce a (hidden, default=true) cluster setting kv.transfer_expiration_leases_first.enabled to feature gate this protocol change.

Release justification: adds a necessary version gate to logic that needs it in multi-version clusters.

Informs cockroachdb#88301. EnableLeaseUpgrade version gates a change in the lease
transfer protocol whereby we only ever transfer expiration-based leases
(and have recipients later upgrade them to the more efficient epoch
based ones). This was done to limit the effects of ill-advised lease
transfers since the incoming leaseholder would need to recognize itself
as such within a few seconds. This needs version gating so that in
mixed-version clusters, as part of lease transfers, we don't start
sending out expiration based leases to nodes that (i) don't expect them
for certain keyspans, and (ii) don't know to upgrade them to efficient
epoch-based ones.

While here, we also introduce a (hidden, default=true) cluster setting
kv.transfer_expiration_leases_first.enabled to feature gate this
protocol change.
@irfansharif irfansharif requested a review from a team as a code owner September 23, 2022 21:06
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@irfansharif irfansharif merged commit 492db3f into cockroachdb:release-22.2 Sep 23, 2022
@irfansharif irfansharif deleted the backport22.2-88408 branch September 23, 2022 23:43
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.

3 participants