-
Notifications
You must be signed in to change notification settings - Fork 123
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
ini: incompatible with mmap cache #2592
Comments
Thank you for reporting this problem! Plugins should always return the same KeySet for the same config file, so something is severely wrong here (in ini).
Can you elaborate? With the same mount points it also should be always the same parentKeys? Why are the parentKeys different? |
Sure, but they are not the same mount point. Assume you mount The ini plugin keeps a "global variable" inside the parentKey of the invocation. The variable is incremented by the ini logic at some point. This results in having different ordering keys depending on the parentKey. |
Ok, now it is clear. So the INI plugin needs to be fixed to not use the global variable. (Or reset it properly in a new context.) |
I don't understand much of the ini plugin, but that sounds right to me. |
|
Actually the problem for |
@kodebach actually we could just fetch the spec of the application again and compare it. (This approach would work with every noresolver plugin.) Or do you think that the number of bytes transmitted make a difference compared to executing a program? But yes, some version schema of the spec is useful in any case. |
Shouldn't this issue be easily reproducibly by simply exporting all keys? (And sometimes the export would differ?) |
the ordering is relative to the parentkey so it's expected behaviour that it differs when called with another parentkey/mountpoint. |
Thank you for the answer! @mpranj Can you elaborate why and how the parentKey gets changed? |
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. |
I closed this issue 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 discovered in #2457, the current cache design and implementation is incompatible when using
ini
as storage.The reason is that ini uses a special meta key
internal/ini/order
to preserve ordering. The problem is that one and the same key, sayuser/some/config
can have different orderings (e.g.#3
vs.#5
) depending on the mount points and the parentKey of the kdbGet invocation.The cache always assumes that unchanged configuration files result in the same keyset, which is not true with ini. The cache can also decide to return a larger keyset, if the requested parentKey is within a larger, already cached keyset.
Due to the incompatibility, we decided in #2457 to disable the cache when ini is used.
I assume that having wrong ordering keys would result in scrambled, possibly incorrect config files. Maybe @tom-wa can clarify whether this is correct?
The text was updated successfully, but these errors were encountered: