-
Notifications
You must be signed in to change notification settings - Fork 55
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
Improve core.trustXXX config options #127
Comments
[Nasser] Unfortunately I think we probably do need them all.
and (for performance reasons) these values for our Gerrit replicas:
I don't know how we would express that replica config with a single option. |
[Matthias] ok, I see I think these options still feel odd:
Would it be clearer to remove trustFolderStat and add options for loose objects and the pack directory:
Can we consolidate to a single And for |
[Nasser]
I don't recall the use case for UNSET. Martin Fick do you recall?
I think the input stream opening only happens on failures though, correct?
I don't think we would want TrustLooseRefStat affecting loose objects, since those are fundamentally different things (objects are immutable).
I don't remember... Kaushik Lingarkar do you recall?
Yeah, that might be a nice improvement. I don't know if you need to open the pack dir or the parent (
Yes, I think having consistent naming like this would be nice.
That sounds reasonable to me.
I don't know the reftable implementation well enough to know if |
[Matthias]
sorry, I went off the rails here, what I meant is we should introduce another
ok, then let's introduce another option In |
I believe the idea is to be able to use trustFolderStat (or some better named thing) to control everything in a single place eventually. i.e. imagine that trustFolerStat started to support after_open, then maybe no one would need to set trustLooseRefStat = after_open or trustPackedRefsStat = after_open, they could just set trustFolderStat = after_open. |
Ah, so
Did I get that right? |
ok, so do we agree on this set of options:
and the more specific options
|
related Gerrit issue: https://issues.gerritcodereview.com/issues/40010601 |
How about trustStats instead of trustFileStat? |
The reason I suggest trustStats instead of trusFileStat is because I believe that sometimes it is the folder stats and not the files stats that we are trusting. I like all the other names that Matthias has suggested, and I like the idea of an explicit INHERIT setting and concept. It will be really nice to basically have only one setting to need to set. Any chance we can make the default for that setting AUTO, and use the FS type to set it to after_open on NFS? |
I thought about the name of the linux fstat function "get file status" which can be also applied to files and folders. How about naming it trustfstat ? Do you have a proposal how to reliably detect NFS from Java ? |
I'm not sure I love adding the "f", but I'm OK with it. Would it be trustFStat? As for NFS, the best I could find is to run stat -fc %T which seems to work on centOs. It may not be ideal, but it might still be worth it? After all auto would be a helper for when it is unset, if it is wrong, the user can configure it, in the meantime it would mostly just work for many people? |
We can also call it trustStat after the stat function. Capitalization doesn't matter since keys of git config options are case-insensitive. Tried this command and it works on Mac OS 15.2, Debian 11, Ubuntu 24.04 and SLES 15 :-) |
Since NFS is not actually Posix, it might be better to have a superclass, maybe something like FS_nix which then has FS_Posix and FS_NFS as subclasses? |
Pushed implementation for review https://eclipse.gerrithub.io/c/eclipse-jgit/jgit/+/1206686 Automatic configuration will be done in another change. |
I'm confused, why are we eliminating the finer grained ref options if we are adding a global switch that can be inherited? |
I think I didn't eliminate finer grained ref options, see The inheritance is implemented in CoreConfig |
I see, sorry, I misread the deprecation notices, they were for code, not for the config items. |
Moving discussion started in change 1206684 to an issue for better visibility.
[Matthias]
Change 1206684 adds usage of
FileSnapshot
toFileReftableStack
to improve performance of determining if thetables.list
file, which contains the names of currently existing reftable files, is modified and needs to be reloaded. On top of that we need to add support for NFS using the usual workarounds we use in theRefDirectory
implementation using thecore.trustXXX
config options.Maybe it's time to consolidate proliferation of trustXXX config options ?
We already have
Should we add another option core.trustTablesListStat for tables.list or consolidate all of these options into a single one ?
Do we really need to configure these options independently ?
The text was updated successfully, but these errors were encountered: