pub struct IndexPolicy {
pub interval: Duration,
pub backoff: u32,
pub tail_threshold: u64,
pub tail_deadline: Duration,
}Expand description
Pacing policy for one database’s background indexing job.
A publication is due when the adaptive floor has elapsed — the base interval stretched by a multiple of the previous publication’s duration, which bounds the indexing duty cycle as full republication gets slower — and the pending log tail is either large enough to be worth rewriting every index or old enough that deferring it further would leave cold readers and backups too far behind.
Every database starts from the node’s NodeConfig pacing fields; the
catalog SetIndexPolicy RPC (or
TransactorNode::set_index_policy) overrides it at runtime.
Fields§
§interval: DurationBase interval between publications (NodeConfig::index_interval).
backoff: u32Duty-cycle multiplier on the previous publication’s duration
(NodeConfig::index_backoff).
tail_threshold: u64Pending-datom count below which a due publication is deferred
(NodeConfig::index_tail_threshold).
tail_deadline: DurationLongest a below-threshold tail may defer publication
(NodeConfig::index_tail_deadline).
Trait Implementations§
Source§impl Clone for IndexPolicy
impl Clone for IndexPolicy
Source§fn clone(&self) -> IndexPolicy
fn clone(&self) -> IndexPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for IndexPolicy
Source§impl Debug for IndexPolicy
impl Debug for IndexPolicy
impl Eq for IndexPolicy
Source§impl PartialEq for IndexPolicy
impl PartialEq for IndexPolicy
impl StructuralPartialEq for IndexPolicy
Auto Trait Implementations§
impl Freeze for IndexPolicy
impl RefUnwindSafe for IndexPolicy
impl Send for IndexPolicy
impl Sync for IndexPolicy
impl Unpin for IndexPolicy
impl UnsafeUnpin for IndexPolicy
impl UnwindSafe for IndexPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request