Fix race conditions between config-manager and persister. 42/3242/1
authorTomas Olvecky <tolvecky@cisco.com>
Fri, 29 Nov 2013 11:17:06 +0000 (12:17 +0100)
committerTomas Olvecky <tolvecky@cisco.com>
Fri, 29 Nov 2013 11:46:31 +0000 (12:46 +0100)
commit0d7444fae6e9873e7af11a762aeb59d833d18573
treedcf71ead56897ac3d99f2d7715d88c726e980bed
parent9f8c38b083e9244b1628aad73c05c0e768772640
Fix race conditions between config-manager and persister.

Config-manager commits a blank transaction each time new ModuleFactory is discovered. At the same time
persister might try to push configuration. Add retries to both routines to overcome optimistic lock failure.

Change-Id: Ia45505d285b2eb6cc7fa949289a3fbeb4c62f9e7
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/BlankTransactionServiceTracker.java
opendaylight/netconf/config-persister-impl/pom.xml
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPersisterNotificationHandler.java
opendaylight/netconf/config-persister-impl/src/test/java/org/opendaylight/controller/netconf/persist/impl/ConfigPersisterNotificationHandlerTest.java [new file with mode: 0644]
opendaylight/netconf/config-persister-impl/src/test/resources/conflictingVersionResponse.xml [new file with mode: 0644]

©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.