Skip to main content

HyperFileRuntimeConfig

Struct HyperFileRuntimeConfig 

Source
pub struct HyperFileRuntimeConfig {
Show 17 fields pub forward_origin_concurrency: usize, pub forward_origin_threshold: usize, pub forward_origin_chunk_size: usize, pub segment_buffer_size: usize, pub segment_mpu_chunk_size: usize, pub segment_mpu_max_concurrency: usize, pub segment_max_object_bytes: usize, pub data_cache_blocks: usize, pub data_cache_dirty_max_bytes_threshold: usize, pub data_cache_dirty_max_blocks_threshold: usize, pub data_cache_dirty_max_flush_interval: u64, pub node_cache_blocks: usize, pub read_get_max_bytes: usize, pub parted_segment_enabled: bool, pub data_cache_dirty_min_bytes_to_part: usize, pub read_max_concurrency: usize, pub flush_conflict_policy: FlushConflictPolicy,
}

Fields§

§forward_origin_concurrency: usize§forward_origin_threshold: usize§forward_origin_chunk_size: usize§segment_buffer_size: usize§segment_mpu_chunk_size: usize§segment_mpu_max_concurrency: usize

The most parts of one segment’s multipart upload in flight at once; the next part starts as one finishes. Default 8. Zero is taken as one.

A segment longer than segment_mpu_chunk_size goes up in parts of that size. Each part in flight is a request with its own connection and TLS and HTTP buffers, and with wal also a copy of its range of the segment. In the default build a part is a view of the segment’s blocks, not a copy.

It does not bound the segment itself, which is held in memory until the upload ends whatever this is.

§segment_max_object_bytes: usize

The most bytes one stored object of a checkpoint may hold. Default, and upper limit, 1 GiB: what a block pointer can address within one object.

A checkpoint larger than this is written as several objects under the parted block-pointer format — data-only parts first, then the part holding the index and the inode, which is what makes it a checkpoint — and is published as one. Under the older formats, and with wal, a checkpoint is always one object, and a flush that would need more is refused before anything is written.

Values above the limit are taken as the limit; below 16 KiB, as 16 KiB.

§data_cache_blocks: usize§data_cache_dirty_max_bytes_threshold: usize§data_cache_dirty_max_blocks_threshold: usize§data_cache_dirty_max_flush_interval: u64§node_cache_blocks: usize§read_get_max_bytes: usize

Cap on the number of bytes a single S3 GET issued by the read path’s coalescing logic may cover. Larger contiguous regions are split into this-sized sub-ranges.

§parted_segment_enabled: bool

Whether this container writes partial segments when memory pressure asks for it, instead of publishing a checkpoint nobody asked for.

On by default, which changes nothing for a container whose format is not crate::meta_format::BlockPtrFormat::PartedSegment — a partial segment is addressable only under that format, and the format is fixed when the container is created. So asking for the format is asking for the behaviour, and this exists to take it back: a container can be created with the format and made to behave exactly as before by clearing this.

What it changes: a dirty-data threshold, or the flush interval, writes the dirty set out as a partial segment and keeps accumulating, rather than publishing. Under a transaction or WalRecoveryMode::Barrier, where crossing a threshold is refused with OutOfMemory because nothing may publish, it writes a partial instead — which is the case this exists for.

What it does not change: an explicit flush, fdatasync, release or commit_txn still writes a consistency point, and with no partial outstanding it writes exactly the single segment it always did.

§data_cache_dirty_min_bytes_to_part: usize

Least dirty data worth writing as a partial segment. Below it, a threshold crossing behaves as it always did.

A partial segment costs an object and a break in what a sequential read can coalesce, so a small one buys little memory for a lasting cost in fragmentation. Defaults to data_cache_dirty_max_bytes_threshold’s own default, which is the amount that triggers a write in the first place.

§read_max_concurrency: usize

Backpressure cap on in-flight S3 GETs spawned by a single fs_read / fh_read after Level-A coalescing.

§flush_conflict_policy: FlushConflictPolicy

How to resolve flush conflicts when another writer has modified the same file between our read and our write. See FlushConflictPolicy for details.

Implementations§

Trait Implementations§

Source§

impl Clone for HyperFileRuntimeConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HyperFileRuntimeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HyperFileRuntimeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for HyperFileRuntimeConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for HyperFileRuntimeConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for HyperFileRuntimeConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for HyperFileRuntimeConfig

Auto Trait Implementations§

Blanket Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
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> Scope for T

Source§

fn with<F, R>(self, f: F) -> R
where Self: Sized, F: FnOnce(Self) -> R,

Scoped with ownership.
Source§

fn with_ref<F, R>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Scoped with reference.
Source§

fn with_mut<F, R>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Scoped with mutable reference.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Value for T
where T: Send + Sync + 'static,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more