Skip to content

Named KV stores / trees for sled #2498

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

Closed
joepio opened this issue Jun 19, 2023 · 7 comments
Closed

Named KV stores / trees for sled #2498

joepio opened this issue Jun 19, 2023 · 7 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed services/sled

Comments

@joepio
Copy link

joepio commented Jun 19, 2023

In sled, a single filesystem path can correspond to multiple KV stores. They are called Trees in sled. I think in OpenDAL they are names, and in S3 they are buckets. Maybe I'm confusing concepts here, but you probably get the point.

Is there a way OpenDAL supports having multiple KV namespaces, without having to open multiple filesystem paths?

@Xuanwo
Copy link
Member

Xuanwo commented Jun 21, 2023

without having to open multiple filesystem paths

That makes sense!

I'm not familiar with sled. I have some questions: Embedded databases like sled and rocksdb will have locks to prevent them from being opened concurrently. Is it safe to open different trees that are in the same directory?

Is there a way OpenDAL supports having multiple KV namespaces

If the answer to the previous question is yes, then we can have Operators for multiple trees simultaneously.

@joepio
Copy link
Author

joepio commented Jun 21, 2023

Is it safe to open different trees that are in the same directory?

Yes, as far as I understand. I've used this feature quite a bunch.

Thanks!

@Xuanwo
Copy link
Member

Xuanwo commented Jun 21, 2023

Cool, let's do this. I think we can add a new config called tree for SledBuilder and use default if it's empty.

Tasks

  • Add tree in SledBuilder
  • Add integration tests to cover sled with specifed tree name.

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2023

Taken by @oowl. Perhaps @joepio could also provide a review?

@joepio
Copy link
Author

joepio commented Jun 23, 2023

You are AWESOME, thank you!

@joepio
Copy link
Author

joepio commented Jun 23, 2023

I'll look a little later, tomorrow

@Xuanwo
Copy link
Member

Xuanwo commented Jun 26, 2023

Implemented by #2516!

@Xuanwo Xuanwo closed this as completed Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed services/sled
Projects
None yet
Development

No branches or pull requests

2 participants