Skip to main content

UringWriter

Struct UringWriter 

Source
pub struct UringWriter { /* private fields */ }
Expand description

io_uring writer: write → fsync → journal → fsync as one linked submission.

§Durability on return

Identical to SafeWriter: the pack bytes are on the device and a journal row on the device references them. What differs is the cost of getting there — one io_uring_enter instead of four blocking syscalls — not what is promised.

Implementations§

Source§

impl UringWriter

Source

pub fn create(archive: &Path) -> Result<Self>

Open archive, set up the ring, register the journal staging buffer, and open the journal beside it — appending to the rows already there, and emitting the Arrow IPC schema header only if the file is new.

Returns a named error — never a silent fallback — if this kernel cannot provide what the chain needs. Nothing on disk is touched before that point is passed.

Source

pub fn journal_path(archive: &Path) -> PathBuf

Path of the journal segment beside archive.

Source

pub fn blobs(&self) -> &File

The blob file, for a reader that wants to pread an extent back.

Source

pub fn journal_file(&self) -> &Path

The journal file path this writer is appending rows to.

Trait Implementations§

Source§

impl ArchiveWrite for UringWriter

Source§

fn append(&self, bytes: &[u8]) -> Result<Extent>

Append these bytes and return when this implementation’s durability contract is met. Returns the byte extent written. Read more
Source§

fn name(&self) -> &'static str

Name it on a bench row.
Source§

fn durability(&self) -> &'static str

One-line statement of what a crash immediately after append returns does to the bytes. On the bench table next to the throughput, because a throughput without this is not a comparison.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.