[freeside-commits] branch FREESIDE_3_BRANCH updated. f24e5af480c4101cb585c2b6f325508a15c8fb3c

Ivan Kohler ivan at freeside.biz
Wed Apr 18 18:03:19 PDT 2018


The branch, FREESIDE_3_BRANCH has been updated
       via  f24e5af480c4101cb585c2b6f325508a15c8fb3c (commit)
      from  2f341bbdeeebb1a138aae020d2297fb22da98f98 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f24e5af480c4101cb585c2b6f325508a15c8fb3c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Apr 18 18:03:13 2018 -0700

    ip allocation mutex for high-traffic implementations, RT#79825

diff --git a/FS/FS/IP_Mixin.pm b/FS/FS/IP_Mixin.pm
index beb41d290..3ec769313 100644
--- a/FS/FS/IP_Mixin.pm
+++ b/FS/FS/IP_Mixin.pm
@@ -130,6 +130,10 @@ sub assign_ip_addr {
   my $self = shift;
   my %opt = @_;
 
+  #otherwise we'll get the same assignment for concurrent identical calls
+  # this will serialize them
+  $_->lock_table foreach @subclasses;
+
   my @blocks;
   my $na = $self->NetAddr;
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/IP_Mixin.pm | 4 ++++
 1 file changed, 4 insertions(+)




More information about the freeside-commits mailing list