BUG-8639: always invalidate primary info cache
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / ModuleShardBackendResolver.java
index f0775ba289fcae321fce46132290e9f32faaa6a1..ee549d36118e8f026f1ed6e83c80b842fe5bbf50 100644 (file)
@@ -108,6 +108,9 @@ final class ModuleShardBackendResolver extends AbstractShardBackendResolver {
             if (failure != null) {
                 LOG.debug("Resolution of cookie {} shard {} failed, removing state", cookie, shardName, failure);
                 backends.remove(cookie, toInsert);
+
+                // Remove cache state in case someone else forgot to invalidate it
+                flushCache(shardName);
             }
         });