[freeside-commits] branch master updated. 7738617402d4f0a6fd6b75fa8c56b48c715a3c51

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


The branch, master has been updated
       via  7738617402d4f0a6fd6b75fa8c56b48c715a3c51 (commit)
      from  69c7d00baa39ccc2fbee0f12d03f49403f04c3cf (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 7738617402d4f0a6fd6b75fa8c56b48c715a3c51
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Apr 18 18:03:07 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