Change in ovirt-engine[ovirt-engine-3.6]: core: Do not acquire in left-most-available order
tnisan at redhat.com
tnisan at redhat.com
Thu Feb 4 10:50:26 UTC 2016
Tal Nisan has submitted this change and it was merged.
Change subject: core: Do not acquire in left-most-available order
......................................................................
core: Do not acquire in left-most-available order
Before this path, when querying MAC from pool, always the leftmost
MAC, from first range with available MAC, was returned. This approach
caused problems when removing/creating new VMs within short time
period.
To remove this problems, before MAC is returned from pool again, all
other free MAC in pool has to be used. As a coincidence of this
change also ranges 'takes turns'. So if we have 3 ranges and perform 3
'queries', each of them will be performed on different range, where
query in this context mean 'acquisition of 1..N MACs'.
Example:
Assume that there are two Ranges, defined as <1,2>, <3,4,5>. Client
code contains single thread, which query pool for MAC, and return it
back before querying for another one. No MAC was queried so far. In
this case, MAC will be returned in this order:
1, 3, 2, 4, 1, 5, 2, 3, 1, 4, 2, 5
then the sequence repeats from start.
Change-Id: I00f4ebf8371c1a0e531baf7ef764c99d0be63ab2
Bug-Url: https://bugzilla.redhat.com/1269301
Signed-off-by: Martin Mucha <mmucha at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/macpoolmanager/MacsStorage.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/macpoolmanager/Range.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/macpoolmanager/MacsStorageTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/macpoolmanager/RangeTest.java
4 files changed, 140 insertions(+), 9 deletions(-)
Approvals:
Martin Mucha: Verified
Alona Kaplan: Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit https://gerrit.ovirt.org/53081
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I00f4ebf8371c1a0e531baf7ef764c99d0be63ab2
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list