allocator: correct node count calculations with overrides#94983
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Jan 25, 2023
Merged
allocator: correct node count calculations with overrides#94983craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
f21e886 to
e6a12bf
Compare
kvoli
approved these changes
Jan 17, 2023
Contributor
kvoli
left a comment
There was a problem hiding this comment.
It looks like some tests need to be updated to use the newer fn signature.
pkg/kv/kvserver/allocator/storepool/override_store_pool_test.go:43:44: not enough arguments in call to NewOverrideStorePool
have (*StorePool, func(nid roachpb.NodeID, now time.Time, timeUntilStoreDead time.Duration) livenesspb.NodeLivenessStatus)
want (*StorePool, NodeLivenessFunc, NodeCountFunc)
Reviewed 3 of 3 files at r1, 4 of 4 files at r2.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @AlexTalks)
-- commits line 2 at r1:
Is this commit already merged into master?
e6a12bf to
1d35290
Compare
kvoli
approved these changes
Jan 20, 2023
Contributor
kvoli
left a comment
There was a problem hiding this comment.
Reviewed 2 of 7 files at r3, 7 of 7 files at r4, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @AlexTalks)
While we are correctly using the overrides set in the `OverrideStorePool` for the purposes of the node liveness function, the node count function did not properly incorporate the overrides previously. This change rectifies that, using the preset overrides specified at creation of the override store pool to calculate the number of non-decommissioning, non-decommissioned nodes (alive or dead), as viewed by the override store pool. This allows for correct calculation of the number of needed voters, allowing us to correctly determine which allocation action is needed for a range. Depends on cockroachdb#93758. Epic: CRDB-20924 Release note: None
1d35290 to
c2e2d13
Compare
Contributor
Author
|
bors r+ |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While we are correctly using the overrides set in the
OverrideStorePoolfor the purposes of the node liveness function, thenode count function did not properly incorporate the overrides
previously. This change rectifies that, using the preset overrides
specified at creation of the override store pool to calculate the number
of non-decommissioning, non-decommissioned nodes (alive or dead), as
viewed by the override store pool. This allows for correct calculation
of the number of needed voters, allowing us to correctly determine which
allocation action is needed for a range.
Depends on #93758.
Epic: CRDB-20924
Release note: None