Details
Description
String mId = "" + doc.get(MACHINE_ID_KEY); String iId = "" + doc.get(INSTANCE_ID_KEY); if (machineId.startsWith(RANDOM_PREFIX)) { // remove expired entries with random keys store.remove(Collection.CLUSTER_NODES, key); continue; }
The intent seems to be to cleanup entries in the cluster node table that start with RANDOM_PREFIX. However, machineId is checked instead of mId. When createInstance is called with a random id, the whole table might get wiped out.