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

Method shutdown

graphlite/src/storage/data_adapter.rs:405–424  ·  view source on GitHub ↗

Explicitly shutdown the storage adapter and release file locks This should be called before dropping to ensure clean resource cleanup

(
        &self,
        driver: &dyn StorageDriver<Tree = Box<dyn StorageTree>>,
    )

Source from the content-addressed store, hash-verified

403 /// Explicitly shutdown the storage adapter and release file locks
404 /// This should be called before dropping to ensure clean resource cleanup
405 pub fn shutdown(
406 &self,
407 driver: &dyn StorageDriver<Tree = Box<dyn StorageTree>>,
408 ) -> Result<(), Box<dyn std::error::Error>> {
409 // Open and flush all trees first
410 let nodes_tree = driver.open_tree("nodes")?;
411 let edges_tree = driver.open_tree("edges")?;
412 let metadata_tree = driver.open_tree("metadata")?;
413 let catalog_tree = driver.open_tree("catalog")?;
414
415 nodes_tree.flush()?;
416 edges_tree.flush()?;
417 metadata_tree.flush()?;
418 catalog_tree.flush()?;
419
420 // Flush the main persistence driver
421 driver.flush()?;
422
423 Ok(())
424 }
425
426 /// List all available graphs in storage
427 pub fn list_graphs(

Callers

nothing calls this directly

Calls 2

open_treeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected