-
Notifications
You must be signed in to change notification settings - Fork 103
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
Data source synchronization performance improvement #1184
Conversation
Hi @ikedas , |
Conflict between this pr and #1189 was resolved. |
Some other comments:
|
Lines 3488 to 3529 in 978001b
I also noticed that inside the Lines 3301 to 3306 in 978001b
and the query: Lines 495 to 523 in 978001b
|
Please tell me, what exactly are the cases in which both UPDATE and INSERT would be executed successfully?
Maybe I don't understand the problem, but executing SELECT doesn't seem to cause a problem as long as the same connection is kept alive ( |
My understanding was that with transactions the queries will be executed when they are committed. So in the I have similar concern for the SELECT statement, that it might be executed only during the |
No need to worry about that. Updates during a transaction appear to be reflected immediately, however updates after BEGIN may be recovered (cancelled) by ROLLBACK or by breakage of connection without COMMIT. On the other hand, updates can be invisible to the other sessions (the connection by the other process) until COMMIT is executed. |
…uld be disabled during transaction.
- Add Sympa::DataSource::is_external(). - use Sympa::List::get_exclusion(). As a side work Sympa::List::is_member_excluded() was deprecated.
[Note by admin] Please visit #1186 for discussion.
I've been looking into improving the performance of synchronizing members from data sources. I moved a couple of queries outside of loops and enabled transactions for the insert/update/remove loops.
This PR currently work in progress. It is lacking some error handling and it fails with SQLite, because of the current SQLite locking workaround.
I would like comments if this type of changes would be acceptable and suggestions for improvements!
Benchmarks
add 20 000, remove 20 000 update 20 000 members
add 60 000, update 40 000 members