You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my scenario, the data of different tenants is stored in different Trees, so that Tree as a tenant. When I create a Tree for a new tenant, I want to know if it has been created before. so I use something like the following to implementation a similar function
let volume_id_bytes = EncodeVolumeId(volume_id)?;ifletSome(_) = self.db.tree_names().iter().find(|name| **name == IVec::from(volume_id_bytes.as_slice())){returnErr(Error::VolumeAlreadyExists(volume_id))}
But I probably have hundreds of millions of volume ids, so I think there might be a problem with that.
I think we should add a method like this, e.g.
if db.existis_tree("tree"){returnErr(...)}// do something...
Proposed Change:
I see that currently sled only has method for open_tree to use, I want to add an method like exists_tree.
The text was updated successfully, but these errors were encountered:
Use Case:
In my scenario, the data of different tenants is stored in different
Tree
s, so thatTree
as a tenant. When I create aTree
for a new tenant, I want to know if it has been created before. so I use something like the following to implementation a similar functionBut I probably have hundreds of millions of volume ids, so I think there might be a problem with that.
I think we should add a method like this, e.g.
Proposed Change:
I see that currently sled only has method for
open_tree
to use, I want to add an method likeexists_tree
.The text was updated successfully, but these errors were encountered: