]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Only lock in set_members on mutating operations
authorKevin Benton <blak111@gmail.com>
Mon, 5 Oct 2015 14:57:54 +0000 (07:57 -0700)
committerKevin Benton <blak111@gmail.com>
Thu, 8 Oct 2015 21:51:48 +0000 (14:51 -0700)
commitda9fcd8ab9e48226b18d42180ae0089c2abbcab5
tree79d4b30f605a79336c83d9bf9ee176393be6869f
parentb10e3bc46fa5f5e870c84b65b672e2fb69cc2b4b
Only lock in set_members on mutating operations

ipset was locking on every set_members call with an external
filesystem lock. This was expensive when lots of ports that
were a part of the same security group were on the same agent.

This patch adjusts it to check if it needs to make a change before
acquiring the semaphore.

Closes-Bug: #1502930
Change-Id: I2553ab74b7d0fbada5d573246194f83d58bd7d56
neutron/agent/linux/ipset_manager.py