From d00c29bafb4faeb92e75b187dd35d77fdda86bed Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Tue, 25 Aug 2020 07:04:34 -0400 Subject: [PATCH] filter networks, only copy current network --- .../main/java/bubble/service/dbfilter/EntityIterator.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bubble-server/src/main/java/bubble/service/dbfilter/EntityIterator.java b/bubble-server/src/main/java/bubble/service/dbfilter/EntityIterator.java index bca8679a..c154a1e0 100644 --- a/bubble-server/src/main/java/bubble/service/dbfilter/EntityIterator.java +++ b/bubble-server/src/main/java/bubble/service/dbfilter/EntityIterator.java @@ -114,6 +114,12 @@ public abstract class EntityIterator implements Iterator { add(setLocalStoragePath(cs)); }); + } else if (!fullCopy && BubbleNetwork.class.isAssignableFrom(c)) { + // only add the network for the node we are starting + entities.stream() + .filter(e -> e.getUuid().equals(network.getUuid())) + .forEach(this::add); + } else if (Account.class.isAssignableFrom(c)) { entities.forEach(e -> add(((Account) e).setPreferredPlan(null)));