-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
fails with level-ttl #66
Comments
what about running |
It is a NotFoundError , either through ttldb.get or with db.get |
hm likey an issue with ttldb , I can check into it
…On Thu, Mar 16, 2017 at 9:54 AM José F. Romaniello ***@***.***> wrote:
It is a NotFoundError , either through ttldb.get or with db.get
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#66 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABE4n7b9YOns6wg1BmEi2L4m9Aeqmdswks5rmT8vgaJpZM4MeZJx>
.
|
wait I know |
@calvinmetcalf you should ignore the minor issues in the example code and see that this is an actual bug in memdown/level-ttl integration. the issue is that memdown is using @jfromaniello as a work around you can convert your keys to Buffers the following code seems to work - const ttldb = ttl(db, { checkFrequency: aday });
const key = Buffer.from('foo');
ttldb.put(key, 'bar', { ttl: aday }, (err) => {
err && console.log(err);
ttldb.get(key, (err, data) => console.log(data));
}) |
@yonjah Thank you very much and sorry for the delay on my response... I missed the notification for your response. By doing this the TTL module seems to work, but I break another part of my code where I was doing something like this: const readStream = type.db.createReadStream({
gte: prefix,
lte: `${prefix}~`,
}); If I do this I don't get any result, I tried converting these to Buffers, but I don't get any result back.. Any ideas how can I get that working? |
@jfromaniello sorry I don't have a lot of experience with levelDB. |
This is likely Level/level-ttl#68 or more specifically Level/level-ttl#68 (comment). |
I am not sure if this is an issue with level-ttl or memdown, but I can't get this to work:
It works if I use leveldown.
The text was updated successfully, but these errors were encountered: