Fixed several bugs in the MM code around index and unique index.#128
Merged
apkar merged 2 commits intoFoundationDB:masterfrom Mar 23, 2019
Merged
Conversation
That including a bug in unique index where it cannot correctly detect duplicated values, a bug in index model where it failed to sanitize 'key' field to recognize the index build request that should be ignored and so on. Also enabled unique index generating in correctness to genrate a small portion (5% assuming a uniform distibution of the random int generator) of the indexes as unique indexes.
apkar
suggested changes
Mar 22, 2019
Contributor
apkar
left a comment
There was a problem hiding this comment.
Did you get a clean correctness run?
apkar
reviewed
Mar 22, 2019
| # uniqueIndex = gen.global_prng.choice([True, False]) | ||
| uniqueIndex = False | ||
| # 5% likelyhood to be unique, assuming a uniform distribution | ||
| uniqueIndex = (gen.global_prng.randint(1,20) == 1) |
Contributor
There was a problem hiding this comment.
As we discussed offline, its probably good idea to reduce the probability much much less, something like 1 out of 1000 times, even less probably. As our insert path wouldn't really consider unique indexes, it's very likely every test with a unique index would fail on the duplicate document error and stop there. It will dominate the tests, and we wouldn't really get much coverage for queries.
Contributor
Author
|
Run 114156 correctness iterations and found only 3 failures, which are all unrelated to the changes here. |
apkar
approved these changes
Mar 23, 2019
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.
That including a bug in unique index where it cannot correctly detect duplicated values, a bug in index model where it failed to sanitize 'key' field to recognize the index build request that should be ignored and so on.
Also enabled unique index generating in correctness to genrate a small portion (5% assuming a uniform distibution of the random int generator) of the indexes as unique indexes.