aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/distributor/operations/idealstate/mergelimiter.h
blob: 35a1e57c0605011e7373d2ed5644c66f4c7c007c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/storage/distributor/operations/idealstate/mergemetadata.h>
#include <vector>

namespace storage::distributor {

class MergeLimiter {
    uint16_t _maxNodes;

public:
    using NodeArray = std::vector<MergeMetaData>;

    explicit MergeLimiter(uint16_t maxNodes);

    void limitMergeToMaxNodes(NodeArray&);
};

} // storage::distributor