libelektra: Cache problems
I still highly suspect that these disabled parts of kdbGet will cause problems with procgetstroage plugins.
However, I cannot verify that, because I simply cannot produce a cache hit. This is because a cache miss is caused, if the resolver returns NO_UPDATE for any of the backends.
A cache hit only happens, if CACHE_HIT was returned for all backends.
Not sure, whether this is intended or not. I also couldn’t find any test cases for the cache, through which I could find out how to get a cache hit.
My suspicion of the bug in kdbGet should be verifiable with the examples/gopts example. If there is some way that its kdbGet call executes the “cache hit” or “no update” branches, the gopts plugin won’t be called and command-line options will not be reported correctly.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (19 by maintainers)
Commits related to this issue
- doc: update relase notes, closes #2806 — committed to mpranj/libelektra by mpranj 5 years ago
- doc: update relase notes, closes #2806 — committed to mpranj/libelektra by mpranj 5 years ago
That should be done before caching in any case.
prockeys are process specific so caching across processes makes no sense.Should be enough for now.
I don’t know of any specification either. I just know about
procgetstoragebecause I created it forgopts.That it is true, but right now I think just running
procgetstorageshould be good enough. It is not good solution, but until a better solution is found I think it is a good compromise.The keys from
procgetstoragedon’t belong to backend, so just running the global plugins like in NO_UPDATE right now, should be fine.It should be quite easy to reproduce a cache hit: simply mount only supported plugins in one mountpoint and then do
kdb geton this mountpoint.It is intended, yes. Without even testing it, I also think that you are right with your suspicion.
The current implementation (the diabled parts) yield about 80x improvement vs. about 10x improvement when the positions are run every time. The slow part was mostly spec afair. This is why we chose to disable these positions, as nobody was using them and the spec plugin was slow there.
If you feel like something essential was disabled, feel free to enable it again. If the plugins at that position are fast, it won‘t even be noticed.