MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / partition_index

Method partition_index

graphlite/src/session/manager.rs:88–92  ·  view source on GitHub ↗
(&self, session_id: &str)

Source from the content-addressed store, hash-verified

86 /// Uses hash-based partitioning for even distribution
87 #[inline]
88 fn partition_index(&self, session_id: &str) -> usize {
89 let mut hasher = DefaultHasher::new();
90 session_id.hash(&mut hasher);
91 (hasher.finish() as usize) % SESSION_PARTITIONS
92 }
93
94 /// Get the storage manager
95 pub fn get_storage_manager(&self) -> Arc<StorageManager> {

Callers 3

create_sessionMethod · 0.80
get_sessionMethod · 0.80
remove_sessionMethod · 0.80

Calls 1

hashMethod · 0.45

Tested by

no test coverage detected