Skip to content
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

Merged
merged 11 commits into from
Aug 2, 2019

Conversation

hutnikau
Copy link
Contributor

@hutnikau hutnikau commented Jul 31, 2019

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:
No index:
act_test_no_index_3

With index:
act_test_with_index_2

@tikhanovichA tikhanovichA self-requested a review July 31, 2019 11:26
@tikhanovichA
Copy link
Contributor

Good job.

Copy link
Contributor

@bugalot bugalot left a 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?

@zagovorichev
Copy link
Contributor

@bugalot could you approve changes, please?

model/RdsResultStorage.php Show resolved Hide resolved
scripts/update/Updater.php Show resolved Hide resolved
scripts/update/dbMigrations/VariablesStorage_v1.php Outdated Show resolved Hide resolved
@bugalot bugalot merged commit 1435f06 into develop Aug 2, 2019
@hutnikau hutnikau deleted the TAO-8802_add_unique_constraint branch April 20, 2020 13:28
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.

None yet

4 participants