#[repr(transparent)]pub struct RelId(pub u64);Expand description
v7.37.15 (Phase C.1) — stable per-catalog relation identity.
§Why a stable id, separate from the table’s Vec position
A Catalog stores tables in a Vec<Table>; a DROP TABLE
removes one, shifting every later table’s position down. So the
physical tables[i] index cannot key:
- the row-lock table — Phase C.4 keys locks by
(RelId, RowId); a lock held across a concurrentDROP TABLEof an unrelated table must keep naming the same relation, - the
RelationStoreshard map — Phase C.5 splits the single catalog latch into aDashMap<RelId, _>of per-relation locks; the key must survive catalog mutation, - a replication relation mapping — Epic R maps a change to its relation by a stable id, not a shifting slot.
RelId is per-catalog, monotonic, and never reused even after
the table is dropped, so a stale lock / redo reference is
detectable rather than silently aliasing a table that reused the
slot. It pairs with RowId to form the (RelId, RowId) tuple
identity Phase C.4’s lock table needs.
Introduced additively in Phase C.1: assigned at CREATE TABLE
and stored on the table, but nothing consumes it yet. u64,
never wraps; 0 is the RelId::UNASSIGNED sentinel, real ids start
at 1.
Tuple Fields§
§0: u64Implementations§
Trait Implementations§
impl Copy for RelId
impl Eq for RelId
Source§impl Ord for RelId
impl Ord for RelId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for RelId
impl PartialOrd for RelId
impl StructuralPartialEq for RelId
Auto Trait Implementations§
impl Freeze for RelId
impl RefUnwindSafe for RelId
impl Send for RelId
impl Sync for RelId
impl Unpin for RelId
impl UnsafeUnpin for RelId
impl UnwindSafe for RelId
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
Mutably borrows from an owned value. Read more