Repository navigation
Fix collection creation validation, disallow replication factor 0 - #5643
Merged
Merged
Conversation
timvisee
force-pushed
the
validate-settings-startup
branch
3 times, most recently
from
December 16, 2024 09:50
dd09d6b to
c37d7ce
Compare
timvisee
marked this pull request as ready for review
December 16, 2024 10:11
timvisee
force-pushed
the
validate-settings-startup
branch
from
December 16, 2024 13:07
b26f317 to
f0e9d3c
Compare
JojiiOfficial
approved these changes
Dec 19, 2024
coszio
approved these changes
Dec 19, 2024
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.
Collection creation validation was broken, or at least parts of it. It allows creating a collection with an invalid configuration, causing crashes along the way.
We did already validate shard number, replication factor and write consistency factor fields in the REST interface, but these validations were missing in the gRPC interface. This has now been added. Along with that I've added the same validation in the collection update API. The fix works for both distributed and non-distributed mode.
We already have a misconfiguration warning on startup, but disallowing the illegal values was not enforced everywhere:
It is possible that a collection already having illegal values configured causes errors when scaling up with a new peer. But that is easily fixed by updating the collection configuration with sounds values. I believe that's better than assuming some default.
Creating a collection over gRPC with a default shard number and replication factor of 0 now returns an error as expected:
All Submissions:
devbranch. Did you create your branch fromdev?