[YANGTOOLS-276] SFc Project broken due to recent controller/yangtools commit Created: 22/Aug/14 Updated: 10/Apr/22 Resolved: 25/Aug/14 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Reinaldo Penno | Assignee: | Tony Tkacik |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| External issue ID: | 1604 |
| Priority: | Highest |
| Description |
|
The scenario is a complete overwrite of a datastore element. During OndataChanged() I spawn an executor to overwrite the data that triggered onDataChanged() itself. Meaning, an element with a certain key already exists and I'm overwriting it with new values. This has always worked until 24hrs ago. On 8/22/14 9:54 AM, Reinaldo Penno wrote: What I noticed is that in OnDataChanged() instead of getting an actual object (as I used to) I'm getting a LazyDataObject and the data is Immutable. h = {org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject@12331}cachedData = {java.util.concurrent.ConcurrentHashMap@12332} size = 5 "ImmutableMapEntryNode{nodeIdentifier=(urn:cisco:params:xml:ns:yang:sfc-sfp?revision=2014-07-01)service-function-path[ {(urn:cisco:params:xml:ns:yang:sfc-sfp?revision=2014-07-01)name=Path-2-SFC1}], value=[ImmutableLeafNode{nodeIdentifier=(urn:cisco:params:... "ListNodeCodecContext [interface org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPath]" size = 0 > The scenario is a complete overwrite of a datastore element. Meaning, an element with a certain key already exists and I'm overwriting it with new values. |
| Comments |
| Comment by Reinaldo Penno [ 22/Aug/14 ] |
|
WriteTransaction writeTx = odlSfc.dataProvider.newWriteOnlyTransaction(); |
| Comment by Reinaldo Penno [ 23/Aug/14 ] |
|
The test below is against "ImmutableOrderedMapNodeBuilder" but getcurrent returns "ImmutableMapEntryNodeBuilder". The corresponding Yang model uses ordered-by user. @Override enter(Builders.mapBuilder().withNodeIdentifier(name)); |
| Comment by Reinaldo Penno [ 23/Aug/14 ] |
|
Tested some more and can say that the issue is the Yang statement ordered-by user; This was handled properly until very recently and now is broken. |
| Comment by Reinaldo Penno [ 24/Aug/14 ] |
|
My scenario is 1 - RESTconf PUTs new data Also, please allow me to be very clear: If I remove "ordered-by user" from my Yang list, everything works. Same code, same everything. |
| Comment by Tony Tkacik [ 25/Aug/14 ] |
|
The precondition was wrong, this was caused by refactor FIx is in: |