Skip to content

Fixed several bugs in the MM code around index and unique index.#128

Merged
apkar merged 2 commits intoFoundationDB:masterfrom
dongxinEric:bugfix/fix-discrepancies-between-MM-and-DocLayer
Mar 23, 2019
Merged

Fixed several bugs in the MM code around index and unique index.#128
apkar merged 2 commits intoFoundationDB:masterfrom
dongxinEric:bugfix/fix-discrepancies-between-MM-and-DocLayer

Conversation

@dongxinEric
Copy link
Copy Markdown
Contributor

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.

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.
@dongxinEric dongxinEric self-assigned this Mar 22, 2019
@dongxinEric dongxinEric requested a review from apkar March 22, 2019 20:22
Copy link
Copy Markdown
Contributor

@apkar apkar left a comment

Choose a reason for hiding this comment

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

Did you get a clean correctness run?

Comment thread test/correctness/document-correctness.py Outdated
# 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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@dongxinEric
Copy link
Copy Markdown
Contributor Author

Run 114156 correctness iterations and found only 3 failures, which are all unrelated to the changes here.

@apkar apkar merged commit 9168603 into FoundationDB:master Mar 23, 2019
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.

2 participants