blob: df6183fd6f97682e905fed61a0e1edd706c7548e (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "bucket_db_snapshot.h"
namespace storage::lib { class ClusterStateBundle; }
namespace search::bmcluster {
/*
* Class representing snapshots of bucket db below SPI for multiple nodes and bucket spaces.
*/
class BucketDbSnapshotVector
{
vespalib::hash_map<document::BucketSpace, std::vector<BucketDbSnapshot>, document::BucketSpace::hash> _snapshots;
using BucketIdSet = BucketDbSnapshot::BucketIdSet;
public:
BucketDbSnapshotVector(const std::vector<storage::spi::PersistenceProvider *>& providers, const storage::lib::ClusterStateBundle &cluster_state_bundle);
BucketDbSnapshotVector(const BucketDbSnapshotVector &) = delete;
BucketDbSnapshotVector & operator = (const BucketDbSnapshotVector &) = delete;
~BucketDbSnapshotVector();
uint32_t count_moved_documents(const BucketDbSnapshotVector &old) const;
uint32_t count_lost_unique_documents(const BucketDbSnapshotVector &old) const;
};
}
|