pub struct LogRecord {
pub buf: Vec<u8>,
pub op_count: u32,
pub has_header: bool,
pub portable_changes: Vec<u8>,
pub portable_changes_enabled: bool,
pub portable_changes_required: bool,
/* private fields */
}Expand description
A log record contains all durable effects of a committed transaction, pre-serialized into a frame buffer that the logical-log flush path finalizes (backfills the TX header, appends the CRC trailer, optionally chunk-encrypts the payload) and writes to disk.
Fields§
§buf: Vec<u8>Frame buffer that grows in place into the on-disk representation.
The first LOG_HDR_SIZE + TX_HEADER_SIZE bytes are pre-reserved
(zeros) so that op-entry appends land at the correct on-disk
offset; the flush path backfills the framing prefix and appends
the trailer.
op_count: u32Number of op entries appended to buf. Includes any header op.
has_header: boolTrue once a DatabaseHeader op has been appended. At most one
header op is allowed per transaction.
portable_changes: Vec<u8>Portable logical-change metadata stored alongside the MVCC recovery log.
Recovery ignores this field. Raw-log consumers use it to resolve the recovery ops’ MVCC table ids and read transaction-level metadata.
portable_changes_enabled: boolTrue when the committing connection requested portable logical-change frames, even if this transaction has no client-visible metadata.
portable_changes_required: boolTrue when a frame must carry a portable transaction wrapper even if the wrapper metadata itself is empty.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogRecord
impl RefUnwindSafe for LogRecord
impl Send for LogRecord
impl Sync for LogRecord
impl Unpin for LogRecord
impl UnsafeUnpin for LogRecord
impl UnwindSafe for LogRecord
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more