blob: 91831e19fe57a2b9b23167205789f12fedc10eac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/storage/bucketdb/bucketcopy.h>
namespace vespalib { class asciistream; }
namespace storage::distributor {
struct MergeMetaData {
uint16_t _nodeIndex;
bool _sourceOnly;
const BucketCopy* _copy;
MergeMetaData() noexcept : _nodeIndex(0), _sourceOnly(false), _copy(nullptr) {}
MergeMetaData(uint16_t nodeIndex, const BucketCopy& copy) noexcept
: _nodeIndex(nodeIndex), _sourceOnly(false), _copy(©) {}
[[nodiscard]] bool trusted() const noexcept {
return _copy->trusted();
}
[[nodiscard]] uint32_t checksum() const noexcept {
return _copy->getChecksum();
}
[[nodiscard]] bool source_only() const noexcept { return _sourceOnly; }
};
vespalib::asciistream& operator<<(vespalib::asciistream& out, const MergeMetaData& e);
}
|