Fix for empty flooding groups due to bucket add/remove commands being reordered, and
triggered by port up/down events very close to each other.

Change-Id: Ibbd7cc6eb6df35396175619d95439acd6da904b8
diff --git a/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index a9c2f04..d57a681 100644
--- a/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -1353,7 +1353,7 @@
                 log.warn(e.getMessage() + " Aborting processDeviceAdded.");
                 return;
             }
-            log.debug("updating groupHandlerMap with new config for device: {}",
+            log.debug("updating groupHandlerMap with new grpHdlr for device: {}",
                     deviceId);
             groupHandlerMap.put(deviceId, groupHandler);
         }
diff --git a/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java b/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java
index 71f5c15..2cb7dc5 100644
--- a/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java
@@ -621,7 +621,7 @@
         if (nextId == -1) {
             if (portUp) {
                 log.debug("**Creating flooding group for first port enabled in"
-                        + " subnet {} on dev {} port {}", vlanId, deviceId, port);
+                        + " vlan {} on dev {} port {}", vlanId, deviceId, port);
                 createBcastGroupFromVlan(vlanId, Collections.singleton(port));
             } else {
                 log.warn("Could not find flooding group for subnet {} on dev:{} when"
@@ -1017,8 +1017,8 @@
             );
         NextObjective nextObj = nextObjBuilder.add(context);
         flowObjectiveService.next(deviceId, nextObj);
-        log.debug("createBcastGroupFromVlan: Submitted next objective {} in device {}",
-                  nextId, deviceId);
+        log.debug("createBcastGroupFromVlan: Submitted next objective {} "
+                + "for vlan: {} in device {}", nextId, vlanId, deviceId);
 
         vlanNextObjStore.put(key, nextId);
     }