-
Notifications
You must be signed in to change notification settings - Fork 123
kdb disable cascading writes #3742
Comments
Has various problems anyway, but yes cascading keys definitely don't make sense here.
Cascading export doesn't make sense anyway. Plugins should only use relative names when writing keys. But how would that work, if the keys are of different namespaces and therefore don't have a common parent.
I would keep it here, but require an additional flag parameter. Similar to how the Unix Similarly it could work for
|
Thanks for opening the issue. I still have a few questions:
Furthermore, does a successful lookup imply that we do a cascading write anyways or cascading writes are to be disabled in general?
Moreover, I second the questions from @kodebach. Thanks in advance! |
I didn't really have any questions... I made some suggestions. But I may be able to answer your questions. I don't think we really need to clarify what "ambiguous" and "if they exist" mean. Like I said, |
That a lookup afterwards would not return the key we add. #401
Such questions are to be decided by you via the analysis you do. I tend towards more automatism (if no namespace given, simply use the user: namespace or system: if called by root but abort in ambiguous cases), @kodebach to less automatism (namespace must be there explicitly). I am not opposed to @kodebach's suggestion, this guessing of namespaces is maybe not the best idea (and I simply got used to it). Anyway, we agree that ambiguous cases should be warned, do we? |
I don't really like the dependency on "user is root". What about no namespace always means
I'd say there should either be no ambiguous cases, or ambiguous cases should result in an error (i.e. do nothing an request clarification). |
The code is here: libelektra/src/tools/kdb/cmdline.cpp Line 497 in 5702ce0
I don't know if user: is a better default. For meta-set spec: might be a default worth considering. But then again we would have a "surprising" magic. |
The fact that |
Probably we should really always specify the namespace. |
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. |
@atmaxinger here is the question if you rewrite the tooling so that this bug gets fixed. |
I mark this 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 by writing a message here or create a new issue with the remainder of this issue. |
I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. |
As @dev2718 found out, it is best to disable cascading writes with an exception if the namespace is explicitly given. So disable cascading writes in:
kdb set
(in ambigious cases)kdb meta-set
(in ambigious cases if they exist)kdb import
kdb editor
kdb export
(which is actually an cascading read but it doesn't make sense ifkdb import
does not work)kdb mv
kdb rm
The text was updated successfully, but these errors were encountered: