cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg38 <>
Subject [GitHub] cloudstack issue #1762: CLOUDSTACK-9595 Transactions are not getting retried...
Date Fri, 25 Nov 2016 05:15:47 GMT
Github user serg38 commented on the issue:
    @rafaelweingartner Tried tracing where  deadlock 5 originated. It seems both transactions
are part of the same method fetchNewPublicIp in IpAddressManagerImpl  . Transactions are executed
on different management servers. 
    Update is triggered through markPublicIpAsAllocated  method 
    Select seems to come from there as well  fetchNewPublicIp in IpAddressManagerImpl
            AssignIpAddressFromPodVlanSearch = _ipAddressDao.createSearchBuilder();
            AssignIpAddressFromPodVlanSearch.and("dc", AssignIpAddressFromPodVlanSearch.entity().getDataCenterId(),
            AssignIpAddressFromPodVlanSearch.and("allocated", AssignIpAddressFromPodVlanSearch.entity().getAllocatedTime(),
            SearchBuilder<VlanVO> podVlanSearch = _vlanDao.createSearchBuilder();
            podVlanSearch.and("type", podVlanSearch.entity().getVlanType(), Op.EQ);
            podVlanSearch.and("networkId", podVlanSearch.entity().getNetworkId(), Op.EQ);
            SearchBuilder<PodVlanMapVO> podVlanMapSB = _podVlanMapDao.createSearchBuilder();
            podVlanMapSB.and("podId", podVlanMapSB.entity().getPodId(), Op.EQ);
            AssignIpAddressFromPodVlanSearch.join("podVlanMapSB", podVlanMapSB, podVlanMapSB.entity().getVlanDbId(),
            AssignIpAddressFromPodVlanSearch.join("vlan", podVlanSearch, podVlanSearch.entity().getId(),
AssignIpAddressFromPodVlanSearch.entity().getVlanId(), JoinType.INNER);
    public IPAddressVO doInTransaction(TransactionStatus status) throws InsufficientAddressCapacityException
                    StringBuilder errorMessage = new StringBuilder("Unable to get ip adress
in ");
                    boolean fetchFromDedicatedRange = false;
                    List<Long> dedicatedVlanDbIds = new ArrayList<Long>();
                    List<Long> nonDedicatedVlanDbIds = new ArrayList<Long>();
                    SearchCriteria<IPAddressVO> sc = null;
                    if (podId != null) {
                        sc = **AssignIpAddressFromPodVlanSearch**.create();
                        sc.setJoinParameters("podVlanMapSB", "podId", podId);
                        errorMessage.append(" pod id=" + podId);
                    } else {
                        sc = AssignIpAddressSearch.create();
                        errorMessage.append(" zone id=" + dcId);

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message