Fix children caching during startup validation [stage]

This commit is contained in:
crschnick
2026-01-30 18:31:38 +00:00
parent 7a182700ad
commit 9796565eba
5 changed files with 15 additions and 3 deletions
@@ -56,6 +56,9 @@ public abstract class DataStorage {
private final Map<DataStore, DataStoreEntry> storeEntryMapCache = new HashMap<>();
private final Map<DataStore, DataStore> storeMoveCache = new IdentityHashMap<>();
@Getter
protected boolean entriesAvailable;
@Getter
@Setter
protected DataStoreCategory selectedCategory;
@@ -1217,7 +1220,12 @@ public abstract class DataStorage {
return parent.isPresent() && parent.get().equals(entry) && !isParentLoop(entry);
})
.collect(Collectors.toSet());
entry.setChildrenCache(children);
// Don't build caches too early to prevent wrong caches
if (entriesAvailable) {
entry.setChildrenCache(children);
}
return children;
}
@@ -59,6 +59,8 @@ public class ImpersistentStorage extends DataStorage {
LOCAL_ID, DataStorage.DEFAULT_CATEGORY_UUID, "Local Machine", new LocalStore());
storeEntries.put(e, e);
e.validate();
entriesAvailable = true;
}
@Override
@@ -275,7 +275,8 @@ public class StandardStorage extends DataStorage {
addStoreEntryIfNotPresent(entry1);
});
});
// Update validities from synthetic parent changes
entriesAvailable = true;
// Update validities from synthetic parent changes and entries available flag changes
refreshEntries();
// Remove user inaccessible entries only when everything is valid, so we can check the parent hierarchies
filterPerUserEntries(storeEntries.keySet());
+1
View File
@@ -53,6 +53,7 @@ The scripting system has been completely reworked with the goal of becoming simp
## Fixes
- Fix various performance issues
- Fix various entries like SSH connections or SSH config entries sometimes disappearing on restart
- Fix SSH config write, e.g. for vscode SSH, not properly passing all configured options
- Fix SSH config identity detection not working for patterns in host entries
- Fix custom SSH agent setting not always overriding other agents configured in SSH config
+1 -1
View File
@@ -1 +1 @@
21.0-3
21.0-4