[MDSAL-21] Need to document correct async RPC usage Created: 30/May/14 Updated: 16/Mar/19 Resolved: 16/Mar/19 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Oxygen SR4 |
| Type: | Improvement | ||
| Reporter: | Rob Adams | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Linux |
||
| Issue Links: |
|
||||||||
| Description |
|
From Robert Varga: The contract of the async RPC APIs returning Future objects does not allow for actual correct handling of asynchronous semantics. However, it turns out that internally it's actually using ListenableFuture with a thread pool that should allow for this to be done correctly, but this is not documented anywhere. We need note this listens to the datastore commits, just as we discussed: DataModificationTransaction t = dataProvider.beginTransaction(); @Override I think the current behavior is that the datastores an exception and RpcResult is unused (which kinda is where we want to go anyway). The topology provider is a singleton writer here, so a failure here is not recoverable. |