Commit ed0b4ac5 authored by Luke Sandberg's avatar Luke Sandberg Committed by Luke Sandberg

add family name to many spans

parent 18430c7f
...@@ -576,6 +576,7 @@ fn prefill_multi_value_database( ...@@ -576,6 +576,7 @@ fn prefill_multi_value_database(
) -> Result<Vec<Box<[u8]>>> { ) -> Result<Vec<Box<[u8]>>> {
let db_config = TpDbConfig { let db_config = TpDbConfig {
family_configs: [FamilyConfig { family_configs: [FamilyConfig {
name: "test",
kind: FamilyKind::MultiValue, kind: FamilyKind::MultiValue,
}], }],
}; };
...@@ -648,6 +649,7 @@ fn setup_prefilled_multi_value_db( ...@@ -648,6 +649,7 @@ fn setup_prefilled_multi_value_db(
fn open_multi_value_db(path: &Path) -> TurboPersistence<SerialScheduler, 1> { fn open_multi_value_db(path: &Path) -> TurboPersistence<SerialScheduler, 1> {
let db_config = TpDbConfig { let db_config = TpDbConfig {
family_configs: [FamilyConfig { family_configs: [FamilyConfig {
name: "test",
kind: FamilyKind::MultiValue, kind: FamilyKind::MultiValue,
}], }],
}; };
...@@ -914,6 +916,7 @@ fn bench_write_multi_value(c: &mut Criterion) { ...@@ -914,6 +916,7 @@ fn bench_write_multi_value(c: &mut Criterion) {
|(tempdir, keys, random_data)| { |(tempdir, keys, random_data)| {
let db_config = TpDbConfig { let db_config = TpDbConfig {
family_configs: [FamilyConfig { family_configs: [FamilyConfig {
name: "test",
kind: FamilyKind::MultiValue, kind: FamilyKind::MultiValue,
}], }],
}; };
......
...@@ -1072,7 +1072,10 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -1072,7 +1072,10 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
.collect::<Vec<_>>(); .collect::<Vec<_>>();
// Merge SST files // Merge SST files
let span = tracing::trace_span!("merge files"); let span = tracing::trace_span!(
"merge files",
family = self.config.family_configs[family as usize].name
);
enum PartialMergeResult<'l> { enum PartialMergeResult<'l> {
Merged { Merged {
new_sst_files: Vec<(u32, File, StaticSortedFileBuilderMeta<'static>)>, new_sst_files: Vec<(u32, File, StaticSortedFileBuilderMeta<'static>)>,
...@@ -1445,7 +1448,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -1445,7 +1448,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
} }
let span = tracing::trace_span!( let span = tracing::trace_span!(
"database read", "database read",
name = family, name = self.config.family_configs[family].name,
result_size = tracing::field::Empty result_size = tracing::field::Empty
) )
.entered(); .entered();
...@@ -1475,7 +1478,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -1475,7 +1478,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
} }
let span = tracing::trace_span!( let span = tracing::trace_span!(
"database read multiple", "database read multiple",
name = family, name = self.config.family_configs[family].name,
result_count = tracing::field::Empty, result_count = tracing::field::Empty,
result_size = tracing::field::Empty result_size = tracing::field::Empty
) )
...@@ -1612,7 +1615,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -1612,7 +1615,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
} }
let span = tracing::trace_span!( let span = tracing::trace_span!(
"database batch read", "database batch read",
name = family, name = self.config.family_configs[family].name,
keys = keys.len(), keys = keys.len(),
not_found = tracing::field::Empty, not_found = tracing::field::Empty,
deleted = tracing::field::Empty, deleted = tracing::field::Empty,
......
...@@ -49,6 +49,7 @@ pub enum FamilyKind { ...@@ -49,6 +49,7 @@ pub enum FamilyKind {
/// Configuration for a single family to describe how the data is stored. /// Configuration for a single family to describe how the data is stored.
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
pub struct FamilyConfig { pub struct FamilyConfig {
pub name: &'static str,
pub kind: FamilyKind, pub kind: FamilyKind,
} }
...@@ -65,6 +66,7 @@ impl<const FAMILIES: usize> Default for DbConfig<FAMILIES> { ...@@ -65,6 +66,7 @@ impl<const FAMILIES: usize> Default for DbConfig<FAMILIES> {
fn default() -> Self { fn default() -> Self {
Self { Self {
family_configs: [FamilyConfig { family_configs: [FamilyConfig {
name: "unknown",
kind: FamilyKind::SingleValue, kind: FamilyKind::SingleValue,
}; FAMILIES], }; FAMILIES],
} }
......
...@@ -1521,6 +1521,7 @@ fn compaction_multi_value_preserves_different_values() -> Result<()> { ...@@ -1521,6 +1521,7 @@ fn compaction_multi_value_preserves_different_values() -> Result<()> {
fn multi_value_config() -> DbConfig<1> { fn multi_value_config() -> DbConfig<1> {
let mut config = DbConfig::<1>::default(); let mut config = DbConfig::<1>::default();
config.family_configs[0] = FamilyConfig { config.family_configs[0] = FamilyConfig {
name: "test",
kind: FamilyKind::MultiValue, kind: FamilyKind::MultiValue,
}; };
config config
...@@ -2097,6 +2098,7 @@ fn compaction_deletes_blob_multi_value_tombstone() -> Result<()> { ...@@ -2097,6 +2098,7 @@ fn compaction_deletes_blob_multi_value_tombstone() -> Result<()> {
let config = DbConfig { let config = DbConfig {
family_configs: [FamilyConfig { family_configs: [FamilyConfig {
name: "test",
kind: FamilyKind::MultiValue, kind: FamilyKind::MultiValue,
}], }],
}; };
......
...@@ -141,7 +141,7 @@ impl<K: StoreKey + Send + Sync, S: ParallelScheduler, const FAMILIES: usize> ...@@ -141,7 +141,7 @@ impl<K: StoreKey + Send + Sync, S: ParallelScheduler, const FAMILIES: usize>
Ok(collector) Ok(collector)
} }
#[tracing::instrument(level = "trace", skip(self, collector))] #[tracing::instrument(level = "trace", skip(self, collector), fields(family_name = self.family_configs[usize_from_u32(family)].name))]
fn flush_thread_local_collector( fn flush_thread_local_collector(
&self, &self,
family: u32, family: u32,
...@@ -243,7 +243,7 @@ impl<K: StoreKey + Send + Sync, S: ParallelScheduler, const FAMILIES: usize> ...@@ -243,7 +243,7 @@ impl<K: StoreKey + Send + Sync, S: ParallelScheduler, const FAMILIES: usize>
/// ///
/// Caller must ensure that no concurrent put or delete operation is happening on the flushed /// Caller must ensure that no concurrent put or delete operation is happening on the flushed
/// family. /// family.
#[tracing::instrument(level = "trace", skip(self))] #[tracing::instrument(level = "trace", skip(self), fields(family_name = self.family_configs[usize_from_u32(family)].name))]
pub unsafe fn flush(&self, family: u32) -> Result<()> { pub unsafe fn flush(&self, family: u32) -> Result<()> {
// Flush the thread local collectors to the global collector. // Flush the thread local collectors to the global collector.
let mut collectors = Vec::new(); let mut collectors = Vec::new();
...@@ -452,7 +452,7 @@ impl<K: StoreKey + Send + Sync, S: ParallelScheduler, const FAMILIES: usize> ...@@ -452,7 +452,7 @@ impl<K: StoreKey + Send + Sync, S: ParallelScheduler, const FAMILIES: usize>
/// Creates a new SST file with the given collector data. /// Creates a new SST file with the given collector data.
/// Returns a tuple of (sequence number, file). /// Returns a tuple of (sequence number, file).
#[tracing::instrument(level = "trace", skip(self, collector_data))] #[tracing::instrument(level = "trace", skip(self, collector_data), fields(family_name = self.family_configs[usize_from_u32(family)].name))]
fn create_sst_file( fn create_sst_file(
&self, &self,
family: u32, family: u32,
......
...@@ -1912,7 +1912,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> { ...@@ -1912,7 +1912,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
let once_task = matches!(task_type, TaskType::Transient(ref tt) if matches!(&**tt, TransientTask::Once(_))); let once_task = matches!(task_type, TaskType::Transient(ref tt) if matches!(&**tt, TransientTask::Once(_)));
if let Some(tasks) = task.prefetch() { if let Some(tasks) = task.prefetch() {
drop(task); drop(task);
ctx.prepare_tasks(tasks); ctx.prepare_tasks(tasks, "prefetch");
task = ctx.task(task_id, TaskDataCategory::All); task = ctx.task(task_id, TaskDataCategory::All);
} }
let in_progress = task.take_in_progress()?; let in_progress = task.take_in_progress()?;
...@@ -2399,6 +2399,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> { ...@@ -2399,6 +2399,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
output_dependent_tasks output_dependent_tasks
.iter() .iter()
.map(|&id| (id, TaskDataCategory::All)), .map(|&id| (id, TaskDataCategory::All)),
"invalidate output dependents",
); );
} }
...@@ -2491,20 +2492,24 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> { ...@@ -2491,20 +2492,24 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
debug_assert!(!new_children.is_empty()); debug_assert!(!new_children.is_empty());
let mut queue = AggregationUpdateQueue::new(); let mut queue = AggregationUpdateQueue::new();
ctx.for_each_task_all(new_children.iter().copied(), |child_task, ctx| { ctx.for_each_task_all(
if !child_task.has_output() { new_children.iter().copied(),
let child_id = child_task.id(); "unfinished children dirty",
make_task_dirty_internal( |child_task, ctx| {
child_task, if !child_task.has_output() {
child_id, let child_id = child_task.id();
false, make_task_dirty_internal(
#[cfg(feature = "trace_task_dirty")] child_task,
TaskDirtyCause::InitialDirty, child_id,
&mut queue, false,
ctx, #[cfg(feature = "trace_task_dirty")]
); TaskDirtyCause::InitialDirty,
} &mut queue,
}); ctx,
);
}
},
);
queue.execute(ctx); queue.execute(ctx);
} }
......
...@@ -1256,10 +1256,14 @@ impl AggregationUpdateQueue { ...@@ -1256,10 +1256,14 @@ impl AggregationUpdateQueue {
self.find_and_schedule_dirty(jobs, ctx); self.find_and_schedule_dirty(jobs, ctx);
false false
} else if !self.scheduled_tasks.is_empty() { } else if !self.scheduled_tasks.is_empty() {
ctx.for_each_task_all(self.scheduled_tasks.keys().copied(), |task, ctx| { ctx.for_each_task_all(
let parent_priority = self.scheduled_tasks[&task.id()]; self.scheduled_tasks.keys().copied(),
ctx.schedule_task(task, parent_priority); "schedule tasks",
}); |task, ctx| {
let parent_priority = self.scheduled_tasks[&task.id()];
ctx.schedule_task(task, parent_priority);
},
);
self.scheduled_tasks.clear(); self.scheduled_tasks.clear();
false false
} else { } else {
...@@ -1444,18 +1448,22 @@ impl AggregationUpdateQueue { ...@@ -1444,18 +1448,22 @@ impl AggregationUpdateQueue {
.map(|job| (job.task_id, job.span.clone())) .map(|job| (job.task_id, job.span.clone()))
.collect(); .collect();
// For performance reasons this should stay `Meta` and not `All` // For performance reasons this should stay `Meta` and not `All`
ctx.for_each_task_meta(jobs.into_iter().map(|job| job.task_id), |task, ctx| { ctx.for_each_task_meta(
let task_id = task.id(); jobs.into_iter().map(|job| job.task_id),
// Enter the enqueue-time span and create a per-task child span with the "find and schedule dirty",
// task description. Both guards must live until the end of the closure. |task, ctx| {
#[cfg(feature = "trace_find_and_schedule")] let task_id = task.id();
let _trace = ( // Enter the enqueue-time span and create a per-task child span with the
spans.remove(&task_id).flatten().map(|s| s.entered()), // task description. Both guards must live until the end of the closure.
trace_span!("find and schedule", %task_id, name = task.get_task_description()) #[cfg(feature = "trace_find_and_schedule")]
.entered(), let _trace = (
); spans.remove(&task_id).flatten().map(|s| s.entered()),
self.find_and_schedule_dirty_internal(task_id, task, ctx); trace_span!("find and schedule", %task_id, name = task.get_task_description())
}); .entered(),
);
self.find_and_schedule_dirty_internal(task_id, task, ctx);
},
);
} }
fn find_and_schedule_dirty_internal( fn find_and_schedule_dirty_internal(
...@@ -1507,21 +1515,25 @@ impl AggregationUpdateQueue { ...@@ -1507,21 +1515,25 @@ impl AggregationUpdateQueue {
update: AggregatedDataUpdate, update: AggregatedDataUpdate,
) { ) {
// For performance reasons this should stay `Meta` and not `All` // For performance reasons this should stay `Meta` and not `All`
ctx.for_each_task_meta(upper_ids.iter().copied(), |mut upper, ctx| { ctx.for_each_task_meta(
let diff = update.apply(&mut upper, ctx.should_track_activeness(), self); upper_ids.iter().copied(),
if !diff.is_empty() { "aggregated data update",
let upper_ids = get_uppers(&upper); |mut upper, ctx| {
if !upper_ids.is_empty() { let diff = update.apply(&mut upper, ctx.should_track_activeness(), self);
self.push( if !diff.is_empty() {
AggregatedDataUpdateJob { let upper_ids = get_uppers(&upper);
upper_ids, if !upper_ids.is_empty() {
update: diff, self.push(
} AggregatedDataUpdateJob {
.into(), upper_ids,
); update: diff,
}
.into(),
);
}
} }
} },
}); );
} }
fn inner_of_uppers_lost_follower( fn inner_of_uppers_lost_follower(
...@@ -1574,20 +1586,24 @@ impl AggregationUpdateQueue { ...@@ -1574,20 +1586,24 @@ impl AggregationUpdateQueue {
if !data.is_empty() { if !data.is_empty() {
// remove data from upper // remove data from upper
// For performance reasons this should stay `Meta` and not `All` // For performance reasons this should stay `Meta` and not `All`
ctx.for_each_task_meta(removed_uppers.iter().copied(), |mut upper, ctx| { ctx.for_each_task_meta(
// STEP 6 removed_uppers.iter().copied(),
let diff = data.apply(&mut upper, ctx.should_track_activeness(), self); "remove data from uppers",
if !diff.is_empty() { |mut upper, ctx| {
let upper_ids = get_uppers(&upper); // STEP 6
self.push( let diff = data.apply(&mut upper, ctx.should_track_activeness(), self);
AggregatedDataUpdateJob { if !diff.is_empty() {
upper_ids, let upper_ids = get_uppers(&upper);
update: diff, self.push(
} AggregatedDataUpdateJob {
.into(), upper_ids,
) update: diff,
} }
}); .into(),
)
}
},
);
} }
// STEP 7 // STEP 7
if !followers.is_empty() { if !followers.is_empty() {
...@@ -2061,6 +2077,7 @@ impl AggregationUpdateQueue { ...@@ -2061,6 +2077,7 @@ impl AggregationUpdateQueue {
upper_ids_with_min_aggregation_number upper_ids_with_min_aggregation_number
.iter() .iter()
.map(|(entry, _)| entry.task_id()), .map(|(entry, _)| entry.task_id()),
"add data to uppers",
|mut upper, ctx| { |mut upper, ctx| {
// STEP 6d // STEP 6d
if has_data { if has_data {
......
...@@ -13,6 +13,7 @@ use std::{ ...@@ -13,6 +13,7 @@ use std::{
}; };
use bincode::{Decode, Encode}; use bincode::{Decode, Encode};
use tracing::trace_span;
use turbo_tasks::{ use turbo_tasks::{
CellId, FxIndexMap, TaskExecutionReason, TaskId, TaskPriority, TurboTasksBackendApi, CellId, FxIndexMap, TaskExecutionReason, TaskId, TaskPriority, TurboTasksBackendApi,
TurboTasksCallApi, TypedSharedReference, backend::CachedTaskType, TurboTasksCallApi, TypedSharedReference, backend::CachedTaskType,
...@@ -44,30 +45,36 @@ pub trait ExecuteContext<'e>: Sized { ...@@ -44,30 +45,36 @@ pub trait ExecuteContext<'e>: Sized {
/// The iterator should not have duplicates, as this would cause over-fetching. /// The iterator should not have duplicates, as this would cause over-fetching.
fn prepare_tasks( fn prepare_tasks(
&mut self, &mut self,
task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)> + Clone, task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>,
reason: &'static str,
); );
fn for_each_task( fn for_each_task(
&mut self, &mut self,
task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>, task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>,
reason: &'static str,
func: impl FnMut(Self::TaskGuardImpl, &mut Self), func: impl FnMut(Self::TaskGuardImpl, &mut Self),
); );
fn for_each_task_meta( fn for_each_task_meta(
&mut self, &mut self,
task_ids: impl IntoIterator<Item = TaskId>, task_ids: impl IntoIterator<Item = TaskId>,
reason: &'static str,
func: impl FnMut(Self::TaskGuardImpl, &mut Self), func: impl FnMut(Self::TaskGuardImpl, &mut Self),
) { ) {
self.for_each_task( self.for_each_task(
task_ids.into_iter().map(|id| (id, TaskDataCategory::Meta)), task_ids.into_iter().map(|id| (id, TaskDataCategory::Meta)),
reason,
func, func,
) )
} }
fn for_each_task_all( fn for_each_task_all(
&mut self, &mut self,
task_ids: impl IntoIterator<Item = TaskId>, task_ids: impl IntoIterator<Item = TaskId>,
reason: &'static str,
func: impl FnMut(Self::TaskGuardImpl, &mut Self), func: impl FnMut(Self::TaskGuardImpl, &mut Self),
) { ) {
self.for_each_task( self.for_each_task(
task_ids.into_iter().map(|id| (id, TaskDataCategory::All)), task_ids.into_iter().map(|id| (id, TaskDataCategory::All)),
reason,
func, func,
) )
} }
...@@ -230,6 +237,7 @@ impl<'e, B: BackingStorage> ExecuteContextImpl<'e, B> { ...@@ -230,6 +237,7 @@ impl<'e, B: BackingStorage> ExecuteContextImpl<'e, B> {
&mut self, &mut self,
task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>, task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>,
call_prepared_task_callback_for_transient_tasks: bool, call_prepared_task_callback_for_transient_tasks: bool,
reason: &'static str,
mut prepared_task_callback: impl FnMut( mut prepared_task_callback: impl FnMut(
&mut Self, &mut Self,
TaskId, TaskId,
...@@ -237,6 +245,13 @@ impl<'e, B: BackingStorage> ExecuteContextImpl<'e, B> { ...@@ -237,6 +245,13 @@ impl<'e, B: BackingStorage> ExecuteContextImpl<'e, B> {
StorageWriteGuard<'e>, StorageWriteGuard<'e>,
), ),
) { ) {
let span = trace_span!(
"prepare_tasks_with_callback",
reason,
requested_data = tracing::field::Empty,
requested_meta = tracing::field::Empty,
);
let _guard = span.enter();
let mut data_count = 0; let mut data_count = 0;
let mut meta_count = 0; let mut meta_count = 0;
let mut all_count = 0; let mut all_count = 0;
...@@ -267,6 +282,8 @@ impl<'e, B: BackingStorage> ExecuteContextImpl<'e, B> { ...@@ -267,6 +282,8 @@ impl<'e, B: BackingStorage> ExecuteContextImpl<'e, B> {
.collect::<Vec<_>>(); .collect::<Vec<_>>();
data_count += all_count; data_count += all_count;
meta_count += all_count; meta_count += all_count;
span.record("requested_data", data_count);
span.record("requested_meta", meta_count);
let mut tasks_to_restore_for_data = Vec::with_capacity(data_count); let mut tasks_to_restore_for_data = Vec::with_capacity(data_count);
let mut tasks_to_restore_for_data_indicies = Vec::with_capacity(data_count); let mut tasks_to_restore_for_data_indicies = Vec::with_capacity(data_count);
...@@ -446,30 +463,41 @@ impl<'e, B: BackingStorage> ExecuteContext<'e> for ExecuteContextImpl<'e, B> { ...@@ -446,30 +463,41 @@ impl<'e, B: BackingStorage> ExecuteContext<'e> for ExecuteContextImpl<'e, B> {
} }
} }
fn prepare_tasks(&mut self, task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>) { fn prepare_tasks(
self.prepare_tasks_with_callback(task_ids, false, |_, _, _, _| {}); &mut self,
task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>,
reason: &'static str,
) {
self.prepare_tasks_with_callback(task_ids, false, reason, |_, _, _, _| {});
} }
fn for_each_task( fn for_each_task(
&mut self, &mut self,
task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>, task_ids: impl IntoIterator<Item = (TaskId, TaskDataCategory)>,
reason: &'static str,
mut func: impl FnMut(Self::TaskGuardImpl, &mut Self), mut func: impl FnMut(Self::TaskGuardImpl, &mut Self),
) { ) {
let task_lock_counter = self.task_lock_counter.clone(); let task_lock_counter = self.task_lock_counter.clone();
self.prepare_tasks_with_callback(task_ids, true, |this, task_id, _category, task| { self.prepare_tasks_with_callback(
// prepare_tasks_with_callback releases the counter before calling this callback, task_ids,
// so the counter is 0 here. Acquire for the TaskGuardImpl that will release on Drop. true,
task_lock_counter.acquire(); reason,
|this, task_id, _category, task| {
let guard = TaskGuardImpl { // prepare_tasks_with_callback releases the counter before calling this callback,
task, // so the counter is 0 here. Acquire for the TaskGuardImpl that will release on
task_id, // Drop.
#[cfg(debug_assertions)] task_lock_counter.acquire();
category: _category,
task_lock_counter: task_lock_counter.clone(), let guard = TaskGuardImpl {
}; task,
func(guard, this); task_id,
}); #[cfg(debug_assertions)]
category: _category,
task_lock_counter: task_lock_counter.clone(),
};
func(guard, this);
},
);
} }
fn task_pair( fn task_pair(
......
...@@ -182,6 +182,7 @@ impl UpdateCellOperation { ...@@ -182,6 +182,7 @@ impl UpdateCellOperation {
dependent_tasks dependent_tasks
.keys() .keys()
.map(|&id| (id, TaskDataCategory::All)), .map(|&id| (id, TaskDataCategory::All)),
"invalidate cell dependents",
); );
UpdateCellOperation::InvalidateWhenCellDependency { UpdateCellOperation::InvalidateWhenCellDependency {
......
...@@ -27,13 +27,24 @@ impl KeySpace { ...@@ -27,13 +27,24 @@ impl KeySpace {
} }
} }
const fn name(&self) -> &'static str {
match self {
KeySpace::Infra => "Infra",
KeySpace::TaskMeta => "TaskMeta",
KeySpace::TaskData => "TaskData",
KeySpace::TaskCache => "TaskCache",
}
}
/// Returns the persistence configuration for this keyspace. /// Returns the persistence configuration for this keyspace.
pub const fn family_config(&self) -> FamilyConfig { pub const fn family_config(&self) -> FamilyConfig {
match self { match self {
KeySpace::Infra | KeySpace::TaskMeta | KeySpace::TaskData => FamilyConfig { KeySpace::Infra | KeySpace::TaskMeta | KeySpace::TaskData => FamilyConfig {
name: self.name(),
kind: FamilyKind::SingleValue, kind: FamilyKind::SingleValue,
}, },
KeySpace::TaskCache => FamilyConfig { KeySpace::TaskCache => FamilyConfig {
name: self.name(),
// TaskCache uses hash-based lookups with potential collisions. // TaskCache uses hash-based lookups with potential collisions.
kind: FamilyKind::MultiValue, kind: FamilyKind::MultiValue,
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment