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

lock issue in List.pm sync_include #744

Closed
seblgr opened this issue Sep 6, 2019 · 3 comments
Closed

lock issue in List.pm sync_include #744

seblgr opened this issue Sep 6, 2019 · 3 comments

Comments

@seblgr
Copy link
Contributor

seblgr commented Sep 6, 2019

When instanciating a list by family (with sympa.pl), the task_manager take over the lock in sync_include. This happens with big lists (over 100,000 subscribers in my tests).

Version

6.2.42

Installation method

source package

Expected behavior

The lock should not be taken over when instanciating a list.

Actual behavior

The lock is taken over by the task_manager.
In the sympa logfile, I see a lot of these errors :

task_manager[25468]:` err main::#148 > Sympa::Spindle::spin#83 > Sympa::Spindle::ProcessTask::_twist#74 > Sympa::Spindle::ProcessTask::_execute#140 > Sympa::Spindle::ProcessTask::_cmd_process#174 > Sympa::Spindle::ProcessTask::do_sync_include#1334 > Sympa::List::sync_include#6773 > Sympa::List::add_list_member#3920 > Sympa::Database::do_prepared_query#382 Unable to execute SQL statement "INSERT INTO subscriber_table (user_subscriber, comment_subscriber, list_subscriber, robot_subscriber, date_epoch_subscriber, update_epoch_subscriber, reception_subscriber, topics_subscriber, visibility_subscriber, subscribed_subscriber, included_subscriber, include_sources_subscriber, custom_attribute_subscriber, suspend_subscriber, suspend_start_date_subscriber, suspend_end_date_subscriber, number_messages_subscriber) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0)": (23000) Duplicate entry 'XXXX' for key 'PRIMARY'

task_manager[25468]: err main::#148 > Sympa::Spindle::spin#83 > Sympa::Spindle::ProcessTask::_twist#74 > Sympa::Spindle::ProcessTask::_execute#140 > Sympa::Spindle::ProcessTask::_cmd_process#174 > Sympa::Spindle::ProcessTask::do_sync_include#1334 > Sympa::List::sync_include#6773 > Sympa::List::add_list_member#3959 Unable to add subscriber XXXX to table subscriber_table for list list@robot

The count of "add_or_subscribe" operation in stat_table (cleared before tests) indicates that both sympa.pl and task_manager are doing the same thing.

Additional information

This issue is fixed by #693 (successfully tested with 6.2.45b.2).
Still I include a patch (which can be applied to 6.2.42 and 6.2.44) : it might be useful to someone else...

sync_include-lock_patch.txt

@ikedas
Copy link
Member

ikedas commented Sep 6, 2019

@seblgr, thanks for information of bug in Sympa. And thanks for sharing fix for earlier versions.

Your patch might be applied by packagers such as Debian team. I'll ask them.

Inclusion feature has been rewritten much by recent beta. If anyone don't feel uncomfortable, we will go with that new codebase. Please let us know if you noticed any problem with beta.

@racke
Copy link
Contributor

racke commented Sep 6, 2019

OK, going to apply the patch to the Debian package. Upgrading to a more recent version isn't that easy, as these added an extra dependency and got rid of sympa_wizard.

@ikedas
Copy link
Member

ikedas commented Sep 7, 2019

Thanks @racke! This issue is closed for now.

@ikedas ikedas closed this as completed Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants