-
Notifications
You must be signed in to change notification settings - Fork 44
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
Cache behavior #237
Comments
I think I need a little more context, this code snippet works fine for me (returns 1). |
Hmmmm ... returns undefined for me. I will try to reproduce in an isolated manner. |
Looks like this was a case of another piece of code having side effects once caching was turned on. It had no side effects with caching off. Eliminated side effect. Eliminated issue. Sorry to have bothered you. |
Further info ... this situation only occurs under very high load, i.e. using benchtest. The value gets into the cache but the awaits on put never resolve. And, put is being called indirectly by my code, e.g. put.call(this,key,value). I have walked into the source an I have reopened since I can reproduce now, even with the side-effects that were in my code removed. I am working on a standalone Benchtest file. |
Definitively a side effect of using Benchtest: This works:
This does not:
|
Would I do something like |
I will create a Git repository you can use.
…On Tue, May 30, 2023, 9:25 AM Kris Zyp ***@***.***> wrote:
Would I do something like import { suite } from 'benchtest'; to test this?
—
Reply to this email directly, view it on GitHub
<#237 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABF2US2X6LBIN5VCXBNR6XTXIYNQDANCNFSM6AAAAAAYSFKCRE>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
@kriszyp see repository https://github.com/anywhichway/lmdb-issues |
I would expect value to be 1 below because it would be reloaded. This does not seem to be the case.
await db.put(1,1);
db.cache.delete(1);
const value = db.get(1);
if(value!==1) console.log(new Error("Value is not 1"));
The text was updated successfully, but these errors were encountered: