-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add SPI jvm option to SystemJvmOptions #50916
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
Changes from 2 commits
39379e4
53acc74
77b0b7a
154c8ab
b3d3f9b
305c215
76877ba
c606038
8423ee0
5f872ae
5afbafa
a43d97a
724302b
457c5cc
f4cf3d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,12 +59,7 @@ static List<String> systemJvmOptions() { | |
"-Dio.netty.allocator.numDirectArenas=0", | ||
// log4j 2 | ||
"-Dlog4j.shutdownHookEnabled=false", | ||
"-Dlog4j2.disable.jmx=true", | ||
/* | ||
* Due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise time/date | ||
* parsing will break in an incompatible way for some date patterns and locales. | ||
*/ | ||
"-Djava.locale.providers=COMPAT")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why can't we keep this in system jvm options? Shouldn't this be something a user doesn't need to think about? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right, it is better to stay in |
||
"-Dlog4j2.disable.jmx=true")); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,44 @@ | ||||||
|
||||||
setup: | ||||||
- skip: | ||||||
version: " - 7.5.99" #todo this test failing on jdk8. has to be removed from 7.x | ||||||
reason: "Start of the week Monday was backported to 7.5" | ||||||
|
||||||
|
||||||
- do: | ||||||
indices.create: | ||||||
index: test | ||||||
body: | ||||||
mappings: | ||||||
properties: | ||||||
date: | ||||||
type: date | ||||||
- do: | ||||||
index: | ||||||
index: test | ||||||
id: 1 | ||||||
body: { "date": "2009-11-15T14:12:12" } | ||||||
- do: | ||||||
indices.refresh: | ||||||
index: [test] | ||||||
--- | ||||||
# The inserted document has a field date=2009-11-15T14:12:12 which is Sunday. | ||||||
# When aggregating per day of the week this should be considered as last day of the week (7) | ||||||
# and this value should be used in 'key_as_string' | ||||||
"Date aggregartion per day of week": | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes - as per todo this test is expected to fail in 1.8 https://github.com/elastic/elasticsearch/pull/50916/files#diff-a1dab819a2bedbcb781ecd85580cfbb5R4 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pugnascotia @rjernst what is your view on this? Maybe we should extend the testing framework to allow checking runtime jvm and skip basing on this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My feeling is that these changes are fine, but what I'm missing is some Javadoc to explain why they're necessary. Unless I have all the context around dates and JDK versions, I can't understand what the checks are for. The new feature name doesn't help here either. Can we add some more explanation into the code, to help other developers understand what is going on and why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pugnascotia good idea. will add some more javadocs as they are clearly missing |
||||||
- do: | ||||||
search: | ||||||
rest_total_hits_as_int: true | ||||||
index: test | ||||||
body: | ||||||
aggregations: | ||||||
test: | ||||||
"date_histogram": { | ||||||
"field": "date", | ||||||
"calendar_interval": "day", | ||||||
"format": "e", | ||||||
"offset": 0 | ||||||
} | ||||||
- match: {hits.total: 1} | ||||||
- length: { aggregations.test.buckets: 1 } | ||||||
- match: { aggregations.test.buckets.0.key_as_string: "7" } |
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.
Shouldn't this just be
8
, not8-
?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.
true, this should just be
8
- removed in favour of conditional check inSystemJvmOptions