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
Hi Spacejam,
I am a developer from https://github.com/datafuselabs/databend and we has been using sled to store meta-data of the databend-DB cluster. As an embedded high performance kv store, sled fits our needs very well.
Except that in some cases, we need to retrieve a list of key-value pairs, such as a bunch of users.
It would be very nice If sled is able to provide a way to create snapshot view for an application to repeatedly scan it and get the same response.
Is it possible to add such a feature to sled?
And we'd be glad to help on this:DDD
Use Case:
Meta data of a database cluster.
It stores database, table, schema.
Proposed Change:
Range scan on a snapshot view. E.g.:
let s = db.snapshot();// Expect a snapshot always returns the same result no matter if other key-values are added or removed.let prev_res = s.range(..);
db.insert(b"a",b"b");
db.remove(b"c",b"d");assert_eq!(s.range(..), prev_res);
Related, it would be great to be able to atomically read a snapshot of the database, and start a subscription that sees changes from that snapshot onward.
tv42
added a commit
to tv42/choosy
that referenced
this issue
Mar 27, 2022
Sled's subscription functionality is hard to operate, and at this time
doesn't really work the right way anyway; can't coordinate subscribing
with taking a snapshot of the existing state:
spacejam/sled#1390 (comment)
Since this is a major change, use this opportunity to port from Tide
to Axum, and thus from async-std to Tokio.
Hi Spacejam,
I am a developer from https://github.com/datafuselabs/databend and we has been using
sled
to store meta-data of the databend-DB cluster. As an embedded high performance kv store,sled
fits our needs very well.Except that in some cases, we need to retrieve a list of key-value pairs, such as a bunch of users.
It would be very nice If
sled
is able to provide a way to create snapshot view for an application to repeatedly scan it and get the same response.Is it possible to add such a feature to
sled
?And we'd be glad to help on this:DDD
Use Case:
Meta data of a database cluster.
It stores
database
,table
,schema
.Proposed Change:
Range scan on a snapshot view. E.g.:
Who Benefits From The Change(s)?
The https://github.com/datafuselabs/databend team and some other guys :D
Alternative Approaches
Add a RWLock to contain the sled db, to prevent writes during
db.range(..)
.The text was updated successfully, but these errors were encountered: