pub(super) struct FCJob<'job> {
pub(super) db: &'job DB,
pub(super) db_state_guard: RwLockReadGuard<'job, DbState>,
pub(super) dangling_nodes: &'job mut DanglingNodeSetsDeque,
}Expand description
A struct that contains references that are used over the course of one run of flushing+compaction.
This type is necessary iff the run makes
1+ const references and 1+ mut references
to fields within struct FlushingAndCompactionWorker.
Fields§
§db: &'job DB§db_state_guard: RwLockReadGuard<'job, DbState>§dangling_nodes: &'job mut DanglingNodeSetsDequeImplementations§
source§impl<'job> FCJob<'job>
impl<'job> FCJob<'job>
pub(super) fn do_flush_and_compact<'data>( &self, units: Vec<&'data CommittedUnit>, skip_tombstones: bool ) -> Result<CompactionResult>
sourcefn should_slice_be_compacted<'data>(units: &[&'data CommittedUnit]) -> bool
fn should_slice_be_compacted<'data>(units: &[&'data CommittedUnit]) -> bool
A given slice of Units should be compacted iff any of:
- The slice contains 1+ MemLogs.
- The slice contains 2+ Units (regardless of MemLogs or SSTables).
This is an arbitrary policy, and can be tuned in the future.
fn potentially_create_compacted_unit<'data>( &self, existing_units: &[&'data CommittedUnit], skip_tombstones: bool ) -> Result<Option<CompactedUnit>>
fn derive_kmerged_iter<'data, K, V>(
entrysets: impl Iterator<Item = &'data CommittedEntrySet<K, OptDatum<V>>>,
skip_tombstones: bool
) -> impl Iterator<Item = Entry<'data, K, OptDatum<V>>>where
K: 'data + Deser + Ord,
OptDatum<V>: 'data + Deser,
fn derive_commit_info<'data>(units: &[&'data CommittedUnit]) -> CommitInfo
source§impl<'job> FCJob<'job>
impl<'job> FCJob<'job>
async fn flush_and_compact_one_segment( &mut self, segm_params: SegmParams ) -> Result<SegmDefnResult>
fn collect_segm_nodes( first_node: NonNullSendPtr<ListNode<CommittedUnit>>, older_node: Option<NonNullSendPtr<ListNode<CommittedUnit>>> ) -> Vec<NonNullSendPtr<ListNode<CommittedUnit>>>
async fn activate_compaction_result( &mut self, segm_params: &SegmParams, older_node: Option<NonNullSendPtr<ListNode<CommittedUnit>>>, unit_nodes: Vec<NonNullSendPtr<ListNode<CommittedUnit>>>, fc_res: CompactionResult ) -> Result<SegmDefnResult>
Auto Trait Implementations§
impl<'job> !RefUnwindSafe for FCJob<'job>
impl<'job> Send for FCJob<'job>
impl<'job> Sync for FCJob<'job>
impl<'job> Unpin for FCJob<'job>
impl<'job> !UnwindSafe for FCJob<'job>
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