INNER CODE UNIT · Rust

open_raw

aannoo/hcom · src/db/mod.rs:209

    pub fn open_raw(db_path: &std::path::Path) -> Result<Self> {
        #[cfg(test)]
        assert_isolated_db_path(db_path);
        let conn = Self::open_connection(db_path)?;

        let inode = get_inode(db_path);

        Ok(Self {
            conn,
            db_path: db_path.to_path_buf(),
            db_inode: inode,
        })
    }

    /// Reconnect if the DB file was replaced (e.g., by hcom reset / schema bump).
    /// Long-lived threads (PTY delivery, listeners) hold an open connection to the
    /// old inode; this moves them onto the new DB file.
    /// Returns true if reconnection happened.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…