Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Introduce jvm.options.d for customizing JVM options #51882
Introduce jvm.options.d for customizing JVM options #51882
Changes from 3 commits
386de64
e8a1685
98a315c
50b7090
ef7c11c
72c2ceb
e609aad
57e29ec
7c5da0a
7d4f151
d388d85
454a899
5738f71
3a2bf7b
ccb522c
e0b1f32
fa13f95
0bc68bd
6695f75
e5ea0c3
5b2c725
886b1a2
53e7073
34dc1d7
e2fe7fc
3977275
c7e8cca
69d8c31
70a0e6c
7fd24a3
7f02018
9a0bb16
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This last sentence seems to be contradicting itself. Do we use lexicographic order, or is this non-deterministic? Lexicographic order is pretty strictly defined. If we are just iterating over a directory list (which it seems we are) then we shouldn't imply any kind of ordering guarantees. FWIW, it would be trivial for us to actually perform a sort here, which would allow folks to do stuff like
10_options
and00_options
for layering overrides in a reliable way.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do sort them, see https://github.com/elastic/elasticsearch/pull/51882/files#diff-38516abb6f177c355f29699955e7e60eR68 in the implementation. However, this relies on the
Path#compareTo
implementation which explicitly says:"Provider" here refers to the filesystem provider. I am assuming (but did not investigate) this enables to account for odd sorting behavior such as on Windows via
StrCmpLogicalW
which sorts filenames by likef-1
,f-2
,f-10
in the orderf-1
,f-2
,f-10
instead off-1
,f-10
,f-2
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to say that if this differs across providers we should even mention that it's lexicographic or not, or even perform the sort for that matter. If we do want to order, we should use a JDK implementation that isn't filesystem dependent, such as simply doing a
String
ordering using the filename. Which I think is effectively going to be what you described in your example.