forked from sensiasoft/sensorhub
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
In DefaultSystemRegistry, you will receive a ConcurrentModificationException when calling removeEntries() with a System Filter to remove systems from a database. However, this issue does not occur if you remove the systems iteratively. This occurs in the registerDatabase() method and the exception does not throw when removing data streams or command streams, but only when removing systems.
systemStateDb.getDataStreamStore().removeEntries(dsFilter);
systemStateDb.getCommandStreamStore().removeEntries(csFilter);
var count = systemStateDb.getSystemDescStore().removeEntries(topLevelSystemsFilter);
if (count > 0)
List<ISystemWithDesc> procsToRemove = systemStateDb.getSystemDescStore().select(procFilter).collect(Collectors.toList());
for(var proc : procsToRemove)
systemStateDb.getSystemDescStore().remove(proc.getUniqueIdentifier());
// var count = systemStateDb.getSystemDescStore().removeEntries(procFilter);
// if (count > 0)
log.info("Database #{} now handles system {}. Removing all records from state DB", db.getDatabaseNum(), uid);Metadata
Metadata
Assignees
Labels
No labels