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
semantic of kdbget/kdbset #1363
Comments
maybe related to #1359 ??? |
Thank you for reporting! This is the most-often reported issue, so we definitely need to fix it ;) The plugin cachefilter implements the desired behavior, #690 proposes to have the new behaviour as default.
Please test cachefilter (mount as global plugin, it should work now, thanks to @mpranj) if it does as you expect. It would also be great to have a new maintainer for cachefilter. The kdbset feature to not change keys outside of the parentKey even though they are passed to
The convenience wrappers with
Only the last part about the convenience wrapper.
Correct decision! We should always fix issues at the root of the problem! |
I am afraid I have to qualify the statement. In Elektra it is also possible to have links to other keys which are looked up at run-time. These keys can be outside of the parentKey. We could:
What do you think? |
(Not needed for lcdproc, thus the high-level API should abstract from that issue) |
I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue. |
Unfortunately, we need to reject this issue:
|
I've been wondering about the returned keySet values of
kdbget
for some time now, specifically why does thekdbget
return more than I have requested?I know, that
kdbget
will return the whole keySet the specific backend delivers, but from a users point of view this is a little bit strange and one could think "why do I get much more than I've requested?"Moreover, multiple calls to
kdbget
do not have - from a users point of view - "expected" results.For example, here the output of a simple test app, which performs several
kdbget
calls (each with a new KeySet):In the first step the user gets much more keys than requested, also those for
user/myapp
(which he/she isn't interested now). In the second step he/she does not get any results as they where already delivered by the firstkdbget
call. This would be different ifuser/myapp
is stored in a different backend. So a user has to keep in mind this technical organisation of the whole key space ("is everything in one backend or do I have to perform multiplekdbget
s ?" ...)As a user, I would intuitively expect something like:
... and hiding the technical implementation detail of backends.
Of course, this would also have impact on
kdbset
. The API docu describes this clearly enough:Moreover,
kdbset
could ensure only to modify keys below the given parentKey, whereas the meaning ofparentKey
forkdbset
would change fromto
So the user will be sure only to modify keys he wants to.
Technically, this shouldn't be very hard to implement. The opened KDB handle could hold the whole KeySet delivered by the backend and
kdbget
returns a possible subset to this KeySet.For users this change would lead to a more "intuitive" API.
Additionally I think we could than add something like
for a shorthand of
kdbget(); kslookup(); kdbset();
What do you think about this?
Or is it something for a more high-level API ?
PS: I considered to implement the Ruby-bindings in that way, but dismissed it, as it would be too big difference to the existing C-API (different behaviour of the same API functions could be dangerous).
The text was updated successfully, but these errors were encountered: