[ONOS-7682] IntentManager.buildAndSubmitBatches overwrites intent operation of pending map with the intent opeation of current map
Change-Id: If5fd87f8caf14b4a668c78db2cd3999aa917cc54
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
index 35876d6..62752e7 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
@@ -469,6 +469,9 @@
if (intent == null) {
continue;
}
+ if (store.getPendingData(key) != null) {
+ continue;
+ }
submit(intent);
}
@@ -478,6 +481,9 @@
if (!store.isMaster(intent.key())) {
continue;
}
+ if (store.getPendingData(intent.key()) != null) {
+ continue;
+ }
IntentState state = getIntentState(intent.key());
if (RECOMPILE.contains(state) || intentAllowsPartialFailure(intent)) {
if (WITHDRAW.contains(state)) {