From e26364f8c3b63ab19c6969eaceedf350f0a9327d Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Wed, 20 Dec 2017 15:26:51 +0000 Subject: guard against empty set of nodes --- storage/src/vespa/storage/distributor/distributorcomponent.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'storage') diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.cpp b/storage/src/vespa/storage/distributor/distributorcomponent.cpp index f0643eec37e..ac6a2957052 100644 --- a/storage/src/vespa/storage/distributor/distributorcomponent.cpp +++ b/storage/src/vespa/storage/distributor/distributorcomponent.cpp @@ -281,6 +281,11 @@ DistributorComponent::updateBucketDatabase( if (updateFlags & DatabaseUpdate::RESET_TRUSTED) { dbentry->resetTrusted(); } + if (dbentry->getNodeCount() == 0) { + LOG(warning, "all nodes in changedNodes set (size %zu) are down, removing dbentry", changedNodes.size()); + bucketSpace.getBucketDatabase().remove(bucket.getBucketId()); + return; + } bucketSpace.getBucketDatabase().update(dbentry); } -- cgit v1.2.3