summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2020-04-02 02:34:48 +0200
committergjoranv <gv@verizonmedia.com>2020-04-02 10:32:35 +0200
commit6e5eb6ff02915a2f1fab382b5cff67b68af883f9 (patch)
treef9da28e04a3625eab23efc4fc9e77e6571e6162f /container-core
parentdf05ca322bca04cc4c12b2e6bdaa252b10e50e7c (diff)
Safeguard against adding disk bundles to allowed duplicates.
This should not be necessary, because disk bundles should be removed by getObsoleteFileReferences (as long as they are present in both the old and new set of bundles). However, there was an incident where all the model amender's bundles were added to the set of allowed duplicates. One possible explanation is that FileReference.equals or hashCode was broken, so an improved version is added by this commit.
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/core/config/BundleLoader.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/BundleLoader.java b/container-core/src/main/java/com/yahoo/container/core/config/BundleLoader.java
index 38aacc2d2a5..ca11ad387ee 100644
--- a/container-core/src/main/java/com/yahoo/container/core/config/BundleLoader.java
+++ b/container-core/src/main/java/com/yahoo/container/core/config/BundleLoader.java
@@ -186,6 +186,7 @@ public class BundleLoader {
// The bundle at index 0 for each file reference always corresponds to the bundle at the file reference location
Set<Bundle> allowedDuplicates = obsoleteReferences.stream()
+ .filter(reference -> ! isDiskBundle(reference))
.map(reference -> reference2Bundles.get(reference).get(0))
.collect(Collectors.toSet());