-
Notifications
You must be signed in to change notification settings - Fork 4
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
add unique constraint to variables storage #93
Conversation
Good job. |
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.
I think there is a misunderstanding
First, with that PR, I will not be able to give the same anwser to two different items in the same delivery execution, which is a problem.
If I have two items with textEntryInteraction, and respond "myanswer" to each of them, we will get one missing result.
On the other hand, the problem is not exactly that. It's only, in the context of synchronization of a VM to the central server.
Last year we had duplicated results while re syncing that's what we need to reproduce. Maybe it was because of multiple Web Servers for the central server?
@bugalot could you approve changes, please? |
Purpose: avoid duplicated in results storage.
Implementation: add unique constraint to variables storage
Made a performance test with/without that unique index:
Env: https://act-test.taocloud.org
Users: 100
Ramp-up: 10 sec
Test size: 8 items
table size: 5,607,787 records
The difference is no more than 3% which is within the margin of error:
![act_test_no_index_3](https://user-images.githubusercontent.com/11025793/62283129-85b79200-b459-11e9-9ccd-1cb41c67fa19.PNG)
No index:
With index:
![act_test_with_index_2](https://user-images.githubusercontent.com/11025793/62283165-96680800-b459-11e9-835d-1f243c73b919.PNG)