Skip to content

kvserver: attempt deflake rq multistore rebalance#94428

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
kvoli:221229.deflake-multiq-rebalance
Dec 29, 2022
Merged

kvserver: attempt deflake rq multistore rebalance#94428
craig[bot] merged 1 commit intocockroachdb:masterfrom
kvoli:221229.deflake-multiq-rebalance

Conversation

@kvoli
Copy link
Copy Markdown
Contributor

@kvoli kvoli commented Dec 29, 2022

Previously,TestReplicateQueueRebalanceMultiStore would calculate the
cluster lease and range count to assert against that the cluster
balanced. This was problematic as the number of ranges may reduce over
the duration of the test, or an inconsistent snapshot of range count
could be taken.

This patch attempts to deflake the test by using the total number of
ranges that is returned when calculating the replicas and leases per
store, in order to avoid the above inconsistency.

Stressing with the patch:

$ dev test pkg/kv/kvserver -fTestReplicateQueueRebalanceMultiStore -v --stress
...
195 runs so far, 0 failures, over 18m25s

Informs: #92219

Release note: None

@kvoli kvoli self-assigned this Dec 29, 2022
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Previously,`TestReplicateQueueRebalanceMultiStore` would calculate the
cluster lease and range count to assert against that the cluster
balanced. This was problematic as the number of ranges may reduce over
the duration of the test, or an inconsistent snapshot of range count
could be taken.

This patch attempts to deflake the test by using the total number of
ranges that is returned when calculating the replicas and leases per
store, in order to avoid the above inconsistency.

Informs: cockroachdb#92219

Release note: None
@kvoli kvoli force-pushed the 221229.deflake-multiq-rebalance branch from f559de0 to 05a7e96 Compare December 29, 2022 18:50
@kvoli kvoli marked this pull request as ready for review December 29, 2022 19:44
@kvoli kvoli requested a review from a team as a code owner December 29, 2022 19:44
@kvoli kvoli requested a review from andrewbaptist December 29, 2022 19:44
Copy link
Copy Markdown
Contributor

@aliher1911 aliher1911 left a comment

Choose a reason for hiding this comment

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

👍

@kvoli
Copy link
Copy Markdown
Contributor Author

kvoli commented Dec 29, 2022

TYFTR
bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 29, 2022

Build succeeded:

@craig craig bot merged commit e056b45 into cockroachdb:master Dec 29, 2022
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.

4 participants