rhtyd commented on a change in pull request #1762: CLOUDSTACK-9595 Transactions
are not getting retried in case of datab?
URL: https://github.com/apache/cloudstack/pull/1762#discussion_r158486829
##########
File path: server/src/com/cloud/network/IpAddressManagerImpl.java
##########
@@ -769,7 +771,7 @@ public IPAddressVO doInTransaction(TransactionStatus
status) throws Insufficient
fetchFromDedicatedRange = false;
sc.setParameters("vlanId",
nonDedicatedVlanDbIds.toArray());
errorMessage.append(", vlanId id=" +
Arrays.toString(nonDedicatedVlanDbIds.toArray()));
- addrs = _ipAddressDao.lockRows(sc, filter, true);
+ addrs = _ipAddressDao.search(sc, filter, false);
Review comment:
Without locking, from the list only first ip address is consumed by
`IPAddressVO addr = addrs.get(0)` which is the source of problem.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services