-
Notifications
You must be signed in to change notification settings - Fork 863
Fix unique key generation [BTS-2209] #21913
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
@@ -1138,31 +1138,17 @@ function KeyGenerationLocationSuite() { | |||
db._drop(cn); | |||
}, | |||
|
|||
testThatFailurePointsWork1: function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test has never worked, since if the failure point did not work, it was green. Now, it cannot be kept, since there should be no situation any more which triggers the single server key generator on a dbserver in a cluster.
try { | ||
c.insert({}); | ||
fail(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary to make the test fail, if the failure point does not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically good.
I just have some minor requests on documentation and tests.
should there as well be test covearge from this in the dump/restore tests in:
|
No, I do not think we need test coverage in dump/restore for this. In the end, restore operations will usually include keys, so key generation will not be triggered at all, as far as I can see. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This addresses https://arangodb.atlassian.net/browse/BTS-2209
The problem arises if there is an AQL INSERT statement in a loop
for a collection which has either exactly one shard or it has
multiple shards and the option
forceOneShardAttributeValue
isused for the case that no user-specified
_key
is given.Design doc: https://github.com/arangodb/documents/blob/master/DesignDocuments/03_IN_PROGRESS/DuplicateIdsFix.md
Scope & Purpose
Checklist