fdb-rs / fdb

FoundationDB client API for Tokio
https://fdb-rs.github.io/
Apache License 2.0
44 stars 2 forks source link

default cluster path not working? #32

Closed ggilley closed 1 year ago

ggilley commented 2 years ago

I took the get_range example, changed the fdb_cluster_file to an empty string, and the open fails with a 1515 error "No cluster file found in current directory or default location".

rajivr commented 2 years ago

Sorry for the delay in replying. This would be an error coming from the C library.

https://apple.github.io/foundationdb/api-error-codes.html

AFAIK, you need a valid cluster file that is write able, before you can open an FDB database.

rajivr commented 2 years ago

@ggilley closing this issue due to inactivity. Please re-open in case the issue is still relevant.

ggilley commented 2 years ago

I think maybe you need to pass null rather than an empty string?

Sent from my iPad

On Aug 18, 2022, at 11:55 PM, Rajiv M Ranganath @.***> wrote:

 Sorry for the delay in replying. This would be an error coming from the C library.

https://apple.github.io/foundationdb/api-error-codes.html

AFAIK, you need a valid cluster file that is write able, before you can open an FDB database.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

rajivr commented 2 years ago

I think maybe you need to pass null rather than an empty string?

According to the C API for fdb_create_database it says,

_If cluster_filepath is NULL or an empty string, then a default cluster file will be used.

I'll re-open this issue and check it prior to the next release. Thanks for the pointer.