pub enum MetadataEntry {
CatalogDdl {
payload: Vec<u8>,
},
TopologyChange(TopologyChange),
RoutingChange(RoutingChange),
ClusterVersionBump {
from: u16,
to: u16,
},
DescriptorLeaseGrant(DescriptorLease),
DescriptorLeaseRelease {
node_id: u64,
descriptor_ids: Vec<DescriptorId>,
},
DescriptorDrainStart {
descriptor_id: DescriptorId,
up_to_version: u64,
expires_at: Hlc,
},
DescriptorDrainEnd {
descriptor_id: DescriptorId,
},
}Expand description
An entry in the replicated metadata log.
Every mutation to cluster-wide state — DDL, topology, routing,
descriptor leases, cluster version bumps — is encoded as one of
these variants, proposed against the metadata Raft group, and
applied on every node by a
crate::metadata_group::applier::MetadataApplier.
The CatalogDdl variant is the single wire shape for every DDL
mutation. Its payload is an opaque, host-serialized
nodedb::control::catalog_entry::CatalogEntry value — the
nodedb-cluster crate is deliberately ignorant of the host’s
per-DDL-object struct shapes. This keeps the cluster crate
layering-clean and makes adding new DDL object types on the
host side a zero-wire-change operation.
Variants§
CatalogDdl
Single generic DDL entry carrying an opaque host-side payload.
Produced by every pgwire DDL handler via
nodedb::control::metadata_proposer::propose_catalog_entry.
TopologyChange(TopologyChange)
RoutingChange(RoutingChange)
ClusterVersionBump
DescriptorLeaseGrant(DescriptorLease)
DescriptorLeaseRelease
DescriptorDrainStart
Begin draining leases on a descriptor. While a drain entry
is active, any acquire_descriptor_lease at
version <= up_to_version must be rejected cluster-wide so
the in-flight DDL that bumps the version can make progress.
expires_at is the HLC at which this drain entry is
considered stale and ignored by is_draining checks on
read. Acts as a TTL that prevents a crashed proposer from
leaving an orphaned drain that blocks the cluster forever.
DescriptorDrainEnd
End draining on a descriptor. Emitted explicitly on drain
timeout so the cluster can make progress. On the happy
path (successful Put* apply), the host-side applier
clears drain implicitly — this variant is the escape
hatch for the failure path.
Fields
descriptor_id: DescriptorIdTrait Implementations§
Source§impl Clone for MetadataEntry
impl Clone for MetadataEntry
Source§fn clone(&self) -> MetadataEntry
fn clone(&self) -> MetadataEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MetadataEntry
impl Debug for MetadataEntry
Source§impl<'de> Deserialize<'de> for MetadataEntry
impl<'de> Deserialize<'de> for MetadataEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'__msgpack_de> FromMessagePack<'__msgpack_de> for MetadataEntry
impl<'__msgpack_de> FromMessagePack<'__msgpack_de> for MetadataEntry
Source§impl PartialEq for MetadataEntry
impl PartialEq for MetadataEntry
Source§impl Serialize for MetadataEntry
impl Serialize for MetadataEntry
Source§impl ToMessagePack for MetadataEntry
impl ToMessagePack for MetadataEntry
impl Eq for MetadataEntry
impl StructuralPartialEq for MetadataEntry
Auto Trait Implementations§
impl Freeze for MetadataEntry
impl RefUnwindSafe for MetadataEntry
impl Send for MetadataEntry
impl Sync for MetadataEntry
impl Unpin for MetadataEntry
impl UnsafeUnpin for MetadataEntry
impl UnwindSafe for MetadataEntry
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.