[CONTROLLER-1198] POST doesn't wait for transaction to succeed Created: 12/Mar/15  Updated: 16/Mar/15  Resolved: 16/Mar/15

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Devin Avery Assignee: Ryan Goulding
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2834

 Description   

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); }

 Comments   
Comment by Ryan Goulding [ 13/Mar/15 ]

Submitted https://git.opendaylight.org/gerrit/#/c/16492/1

Comment by Ryan Goulding [ 13/Mar/15 ]

Submitted https://git.opendaylight.org/gerrit/#/c/16500/1 for Helium

Generated at Wed Feb 07 19:54:55 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.