-
Notifications
You must be signed in to change notification settings - Fork 4k
mmaprototype: add more error cases in TestNormalizedVoterAllRelationships #158656
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
Conversation
This commit adds assertions on emptyVoterConstraintIndex and emptyConstraintIndex since there should only be one.
This commit refactors some code in doStructuralNormalization to use min utility and also adds assertions on programming errors.
This commit fixes >= 0 when checking for whether there were valid emptyVoterConstraintIndex and emptyConstraintIndex since 0 is a valid index.
A=[+region=a, +zone=a1], B=[+region=a, +zone=a2] is now classified as non-intersecting. This fixes an existing todo. Epic: CRDB-55052 Release note: None # Conflicts: # pkg/kv/kvserver/allocator/mmaprototype/constraint.go
Previously, we started returning conjNonIntersecting when we encounter same type, same key, different values. However, the fix only returned early if the differing value is encountered from cc. This commit changed it so that we also check and return early for b.
|
@sumeerbhola I ended up cherry-picking your commit and added more tests as part of the work. So I will close #158380 in favor of this one if it looks good to you. |
Potential Bug(s) DetectedThe three-stage Claude Code analysis has identified potential bug(s) in this PR that may warrant investigation. Next Steps: Note: When viewing the workflow output, scroll to the bottom to find the Final Analysis Summary. After you review the findings, please tag the issue as follows:
|
|
Closing in favor of #158722. Opened a new PR since this one hasn’t been reviewed yet, which should make reviewable cleaner given my rebase. |
Based on top of #158393. Only the last 5 commits.
Epic: CRDB-55052
Release note: none
mmaprototype: add more error cases test coverage
mmaprototype: improve comment on relationship
mma: additional case for non-intersecting conjunctions
A=[+region=a, +zone=a1], B=[+region=a, +zone=a2] is now classified as
non-intersecting. This fixes an existing todo.
mmaprototype: fix conjNonIntersecting
Previously, we started returning conjNonIntersecting when we encounter
same type, same key, different values. However, the fix only returned
early if the differing value is encountered from cc. This commit changed
it so that we also check and return early for b.
mmaprototype: add test cases for conjNonIntersecting