Uploaded image for project: 'netvirt'
  1. netvirt
  2. NETVIRT-1075

NeutronvpnUtils: handle transactions with jobCoordinator to avoid blocking

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • Magnesium
    • None
    • None

    Description

      Now we are using  in NeutronvpnUtils: updateVpnInstanceOpWithType  blocking transaction:

      VpnInstanceOpDataEntryBuilder builder = new VpnInstanceOpDataEntryBuilder(vpnInstanceOpDataEntry);
      builder.setBgpvpnType(choice);
      WriteTransaction writeTxn = dataBroker.newWriteOnlyTransaction();
      writeTxn.merge(LogicalDatastoreType.OPERATIONAL, id, builder.build(), false);
      LOG.debug("updateVpnInstanceOpWithType: sent merge to operDS BgpvpnType {} for {}", choice, vpn.getValue());
      try {
           writeTxn.submit().get();

      ....

      And the same in some other methods.

      It will be better to refactor NeutronvpnUtils, and to use async transactions handeled by jobCoordinator as much as possible, to avoid blocking

      https://git.opendaylight.org/gerrit/#/c/57411/153/vpnservice/neutronvpn/neutronvpn-impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnUtils.java@1627

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            valentina.krasnobaeva Valentina Krasnobaeva
            valentina.krasnobaeva Valentina Krasnobaeva
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: