Skip to content
Snippets Groups Projects
Commit 6b4ab181 authored by abat's avatar abat
Browse files

Merge into master from pull request #274:

Update for Corrupted device index (https://github.com/floodlight/floodlight/pull/274)
parents c467d6d7 67f33e73
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,15 @@ public abstract class DeviceIndex {
IndexedEntity oio = new IndexedEntity(keyFields, o);
if (oio.equals(ie)) return;
}
removeEntity(entity, deviceKey);
Iterator<Long> keyiter = this.queryByEntity(entity);
while (keyiter.hasNext()) {
Long key = keyiter.next();
if (key.equals(deviceKey)) {
removeEntity(entity, deviceKey);
break;
}
}
}
}
\ No newline at end of file
}
......@@ -1162,7 +1162,14 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
if (deleteQueue != null) {
for (Long l : deleteQueue) {
Device dev = deviceMap.get(l);
this.deleteDevice(dev);
deviceMap.remove(l);
// generate new device update
deviceUpdates =
updateUpdates(deviceUpdates,
new DeviceUpdate(dev, DELETE, null));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment