package: sympa
severity: important
version: 6.2.40~dfsg-1
affects: 6.2.40~dfsg-2
tag: patch

From https://github.com/sympa-community/sympa/issues/744:

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).

Patch attached.

Regards
       Racke

-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.
--- a/src/lib/Sympa/List.pm     2019-08-22 09:50:38.568000000 +0200
+++ b/src/lib/Sympa/List.pm     2019-08-22 09:51:38.340000000 +0200
@@ -6491,6 +6491,14 @@
     my $total           = 0;
     my $errors_occurred = 0;
 
+    ## Get an Exclusive lock
+    my $lock_fh =
+        Sympa::LockedFile->new($self->{'dir'} . '/include', 10 * 60, '+');
+    unless ($lock_fh) {
+        $log->syslog('err', 'Could not create new lock');
+        return undef;
+    }
+
     ## Load a hash with the old subscribers
     for (
         my $user = $self->get_first_list_member();
@@ -6612,14 +6620,6 @@
     my $users_added   = 0;
     my $users_updated = 0;
 
-    ## Get an Exclusive lock
-    my $lock_fh =
-        Sympa::LockedFile->new($self->{'dir'} . '/include', 10 * 60, '+');
-    unless ($lock_fh) {
-        $log->syslog('err', 'Could not create new lock');
-        return undef;
-    }
-
     ## Go through previous list of users
     my $users_removed = 0;
     my $user_removed;

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to