aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/distributor/cancelled_replicas_pruner.h
blob: f12f78e569f2cb4f49b055fca6961571f6b53083 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/storage/bucketdb/bucketcopy.h>
#include <vespa/storage/distributor/operations/cancel_scope.h>
#include <span>
#include <vector>

namespace storage::distributor {

/**
 * Returns a new vector that contains all entries of `replicas` whose nodes are _not_ tagged as
 * cancelled in `cancel_scope`. Returned entry ordering is identical to input ordering.
 */
[[nodiscard]] std::vector<BucketCopy> prune_cancelled_nodes(std::span<const BucketCopy> replicas, const CancelScope& cancel_scope);

}