MCPcopy Create free account
hub / github.com/cosdata/cosdata / flush_all

Method flush_all

src/models/cache_loader.rs:93–115  ·  view source on GitHub ↗
(&self, version: VersionNumber)

Source from the content-addressed store, hash-verified

91 }
92
93 pub fn flush_all(&self, version: VersionNumber) -> Result<(), BufIoError> {
94 self.bufmans.flush_all()?;
95 self.prop_file
96 .write()
97 .map_err(|_| BufIoError::Locking)?
98 .flush()
99 .map_err(BufIoError::Io)?;
100 if self.enable_context_history {
101 self.latest_version_links_bufman
102 .flush_versioned(|region_id| {
103 self.root_path
104 .join(format!("{}-{}.ptr", region_id, *version))
105 })
106 } else {
107 let mut file = OpenOptions::new()
108 .read(false)
109 .write(true)
110 .create(true)
111 .truncate(false)
112 .open(self.root_path.join("nodes.ptr"))?;
113 self.latest_version_links_bufman.flush(&mut file)
114 }
115 }
116
117 pub fn get_prop(
118 &self,

Callers

nothing calls this directly

Calls 3

flush_versionedMethod · 0.80
flushMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected