Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1198

POST doesn't wait for transaction to succeed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • None
    • Helium
    • restconf
    • None
    • Operating System: All
      Platform: All

    • 2834

      A restconf POST does not wait for the write transaction to the datastore to succeed before returning, where as the PUT does wait. This is inconsistent behavior.

      My expectation is that both PUT and POST will BLOCK until the transaction written to the datastore succeeds, OR if an error occurrs, that error is returned to the caller.

      See RestconfImpl, public Response createConfigurationData(final Node<?> payload) { method.

      This method calls these sub methods to get a callable, but then never waits on the callable.

      try {
      if (mountPoint != null)

      { broker.commitConfigurationDataPost(mountPoint, iiWithData.getInstanceIdentifier(), datastoreNormalizedData); // <--- NEEDS .get() to block until call done }

      else

      { broker.commitConfigurationDataPost( iiWithData.getInstanceIdentifier(), datastoreNormalizedData); // <-- needs .get() to block until call is done }

      } catch (Exception e)

      { throw new RestconfDocumentedException("Error creating data", e); }

            rgoulding Ryan Goulding
            devin.avery@brocade.com Devin Avery
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: