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

Closed
andy-thomason opened this issue May 9, 2024 · 1 comment · Fixed by #1939
Closed

Low level database access? #1892

andy-thomason opened this issue May 9, 2024 · 1 comment · Fixed by #1939

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!

@andy-thomason
Copy link
Author

Thanks. @xgreenx

I'll pass this on to Mahdi who is implementing data ingestion.

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

Successfully merging a pull request may close this issue.

1 participant