mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-03 19:30:31 +00:00
Fix children caching during startup validation [stage]
This commit is contained in:
@@ -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());
|
||||
|
||||
Vendored
+1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user