Improve RESTCONF thread safety when reconfiguring 41/9341/2
authorRobert Varga <rovarga@cisco.com>
Sat, 26 Jul 2014 04:18:40 +0000 (06:18 +0200)
committerRobert Varga <rovarga@cisco.com>
Sat, 26 Jul 2014 15:26:41 +0000 (17:26 +0200)
commit45e30eb7b15b6c042cd888341e4e8e80fac31209
treebe5c0e972343ec6fab4a008fc458fc0f584b3ee4
parentcf1a8da1f3ee11170ce05611d85d15b1aceed8e8
Improve RESTCONF thread safety when reconfiguring

There is a race which could see us without a populated mapping while a
schemacontext change is underway. Use a immutablemap guarded by an
atomicreference to allow proper switching. Note that the fix is
incomplete, as the schema context needs to be replaced at the same time.

Change-Id: I7d64fae99a0bc0f7d1ec19f08450c1954cb7af97
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.