pub struct BatchOptions {
pub max_concurrent_docs: Option<usize>,
pub max_inflight_bytes: Option<usize>,
}Expand description
Concurrency limits for batch processing.
Both limits are optional and independent. When both are set the more restrictive one governs at any given moment.
Fields§
§max_concurrent_docs: Option<usize>Maximum documents in-flight simultaneously.
This field drives two independent limits that both happen to share this value:
ConcurrencyController::max_inflight_rows— the semaphore that rate-limits how many documents can hold permits at the same time.buffer_unorderedcap — how many per-document futures are created and polled ahead of readiness.
In practice they are always set together: the effective maximum is the minimum of whichever blocks first for a given workload. Defaults to 32.
max_inflight_bytes: Option<usize>Maximum total bytes of document content in-flight simultaneously.
Useful for memory-bounded batch runs over large corpora. None means
unlimited (byte accounting is still tracked for observability).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchOptions
impl RefUnwindSafe for BatchOptions
impl Send for BatchOptions
impl Sync for BatchOptions
impl Unpin for BatchOptions
impl UnsafeUnpin for BatchOptions
impl UnwindSafe for BatchOptions
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