[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 |
||
| 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 { 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 ] |
| Comment by Ryan Goulding [ 13/Mar/15 ] |
|
Submitted https://git.opendaylight.org/gerrit/#/c/16500/1 for Helium |