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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//! Filter interface for identifying extinct records.
//!
//!
//! # Record Extinction
//!
//! Record extinction is an optimized deletion mechanism for large sets of
//! records that are known to be permanently unused. Instead of logging a
//! delete entry per record, a single `Environment::discard_extinct_records`
//! call logs one entry covering the entire key range, and the cleaner
//! asynchronously removes the records and reclaims disk space.
//!
//! **Semantics**: Once records are marked extinct via
//! `discard_extinct_records`, the application must not read or write them
//! again. does not guarantee transactional semantics for extinct records.
//!
//! ExtinctionFilter.ExtinctionStatus` (extended fork 18.1+).
/// Classification returned by [`ExtinctionFilter::get_extinction_status`].
///
///
/// Callback for classifying records as extinct.
///
///
///
/// Implement this trait and register it with `EnvironmentConfig` before
/// calling `crate::Environment::discard_extinct_records`.
///
/// # Requirements
///
/// For every key previously specified in `discard_extinct_records`, this
/// method **must** return [`ExtinctionStatus::Extinct`] or
/// [`ExtinctionStatus::MaybeExtinct`]. Returning
/// [`ExtinctionStatus::NotExtinct`] for an extinct key is a contract
/// violation and may trigger an `EnvironmentFailureException`.