Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low level database access? #1892

Open
andy-thomason opened this issue May 9, 2024 · 0 comments
Open

Low level database access? #1892

andy-thomason opened this issue May 9, 2024 · 0 comments

Comments

@andy-thomason
Copy link

It would be very useful to be able to access the database from an external process such as in the following example:

fn access_database() -> anyhow::Result<()> {
    let path = Path::new("/data/fuel/data/fuel_beta5");
    let database = Database::open(path, None)?;

    let h = database.latest_height()?;
    println!("h={h}");
    Ok(())
}

We can do this with many blockchain nodes without stopping the service
and it provides a low-latency, high-throughput interface to the state of the node.
But it seems that the rocksdb database has a permanent lock on the LOCK file.

Perhaps there is something I don't understand or an alternative table-level interface
such as Erigon's KV gRPC (not ideal, but better than GraphQL).

If I am being an idiot, please say so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant