From 113f0794492f8bb88c0b625067c3705863e11def Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 27 Aug 2021 17:24:45 -0400 Subject: [PATCH] Uncache the entity before starting the work This fixes a situation where several entities in the queue are involved in a disconnected crossing, and the first one detects the disconnection, but a later one clears out that first detection from the cache. Now we clear caches one time before starting the validation work. --- modules/core/validator.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/core/validator.js b/modules/core/validator.js index ac04e92a3..dd634726b 100644 --- a/modules/core/validator.js +++ b/modules/core/validator.js @@ -670,9 +670,10 @@ export function coreValidator(context) { if (cache.queuedEntityIDs.has(entityID)) return null; // queued already cache.queuedEntityIDs.add(entityID); + // Clear caches for existing issues related to this entity + cache.uncacheEntityID(entityID); + return () => { - // Clear caches for existing issues related to this entity - cache.uncacheEntityID(entityID); cache.queuedEntityIDs.delete(entityID); const graph = cache.graph;