blob: 245c38ef9dbb3783cd57f8628241d9ba9608905f (
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 Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
namespace storage::lib {
class ClusterState;
}
namespace storage::distributor {
/*
* Returns whether the state transition from a -> b is idempotent in terms
* of buckets needing to be pruned from the distributor's bucket database.
*
* Examples of when this is the case:
* - `a` and `b` differ only in state version number
* - Storage node 1 is .s:d in `a`, and .s:m in `b`. Buckets have already
* been pruned when `a` was processed.
* - Node startup timestamps have been changed. This will trigger bucket
* info re-fetches if the distributor observes a higher startup timestamp
* than it currently was aware of, but does not need any pruning.
*/
bool db_pruning_may_be_elided(const lib::ClusterState& a,
const lib::ClusterState& b,
const char* up_states = "uri");
}
|