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
Fix cached plan not getting invalidated #1348
Conversation
If we avoid to use monotonic memory, the difference in memory consumption (when we use variable and when we don't) will decrease but still remain significant. |
The problem here seems to be the caching of query plans (probably query plan cache). The solution is to implement some cache eviction strategy, LRU or some background process (LRU is the best place to start). |
Since we are not invoking a garbage collector for plan cache, for testing purposes, I changed the With that minor change, I was able to release all the memory used by the plan cache: I'm still confused about what actually happens there when we call the FREE MEMORY query. |
TODO:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two comments left, and that is it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, good job here 🥳
This PR is about resolving memory spike that happens when we use variable in MERGE statement. The MERGE clause that contains variable for a node will cause a significant memory spike 30x times.
[master < Task] PR
To keep docs changelog up to date, one more thing to do:
closes #1251