pub struct PartInfo {
pub partition_id: String,
pub min_block: i64,
pub max_block: i64,
pub level: u32,
pub mutation: i64,
/* private fields */
}Expand description
What a part’s directory name says: {partition}_{min block}_{max block}_{level}, with _{mutation} after it
once a mutation has rewritten the part.
The partition id runs up to the name’s first underscore. A patch part, which a lightweight update writes,
has a partition id that starts with patch-, so it shares a partition with no regular part.
Fields§
§partition_id: String§min_block: i64§max_block: i64§level: u32§mutation: i64The version of the last mutation applied, or zero.
Implementations§
Source§impl PartInfo
impl PartInfo
Sourcepub const MAX_LEVEL: u32 = 999_999_999
pub const MAX_LEVEL: u32 = 999_999_999
The level of the covering part that REPLACE PARTITION and DROP PARTITION leave.
pub const PATCH_PREFIX: &'static str = "patch-"
pub fn new( partition_id: impl Into<String>, min_block: i64, max_block: i64, level: u32, mutation: i64, ) -> PartInfo
Sourcepub fn parse(name: &str) -> Option<PartInfo>
pub fn parse(name: &str) -> Option<PartInfo>
Parses a part’s directory name. None for every other name a table’s directory holds, such as
detached, format_version.txt, mutation_7.txt and tmp_insert_all_1_1_0.
pub fn is_patch(&self) -> bool
Sourcepub fn data_version(&self) -> i64
pub fn data_version(&self) -> i64
Mutations with a version above this still apply to the part.
Sourcepub fn contains(&self, other: &PartInfo) -> bool
pub fn contains(&self, other: &PartInfo) -> bool
Whether this part holds everything other holds: it came from merging other with other parts, or from
mutating it. A part contains itself.
Sourcepub fn is_disjoint(&self, other: &PartInfo) -> bool
pub fn is_disjoint(&self, other: &PartInfo) -> bool
Whether the two parts share no block.
Trait Implementations§
impl Eq for PartInfo
impl StructuralPartialEq for PartInfo
Auto Trait Implementations§
impl Forget for PartInfo
impl Freeze for PartInfo
impl Move for PartInfo
impl RefUnwindSafe for PartInfo
impl Send for PartInfo
impl Sync for PartInfo
impl Unpin for PartInfo
impl UnsafeUnpin for PartInfo
impl UnwindSafe for PartInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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