MCPcopy Create free account
hub / github.com/acking-you/static_flow / table_access_lock_path

Function table_access_lock_path

crates/store/src/optimize.rs:477–493  ·  view source on GitHub ↗
(lock_key: &str)

Source from the content-addressed store, hash-verified

475}
476
477fn table_access_lock_path(lock_key: &str) -> PathBuf {
478 let mut hasher = DefaultHasher::new();
479 lock_key.hash(&mut hasher);
480 let hash = hasher.finish();
481 let label = lock_key
482 .rsplit('/')
483 .next()
484 .unwrap_or(lock_key)
485 .trim_end_matches(".lance")
486 .chars()
487 .map(|ch| if ch.is_ascii_alphanumeric() || matches!(ch, '-' | '_') { ch } else { '_' })
488 .collect::<String>();
489 let label = if label.is_empty() { "table" } else { label.as_str() };
490 std::env::temp_dir()
491 .join("staticflow-table-locks")
492 .join(format!("{label}-{hash:016x}.lock"))
493}
494
495async fn prune_table_versions_with_recovery(
496 table: &Table,

Callers 2

local_table_lock_pathFunction · 0.70

Calls 4

nextMethod · 0.80
finishMethod · 0.45
is_emptyMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected