-
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
Conversation
Adding back accidently removed jvm options that is required to enfoce start of the week = Monday in IsoCalendarDataProvider.
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
# 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 comment
The reason will be displayed to describe this comment to others. Learn more.
"Date aggregartion per day of week": | |
"Date aggregation per day of week": |
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.
yes - as per todo this test is expected to fail in 1.8 https://github.com/elastic/elasticsearch/pull/50916/files#diff-a1dab819a2bedbcb781ecd85580cfbb5R4
I am actually not sure how to work around this, the code for using IsoCalendarDataProvider is in 7.x but because we support JDK1.8 I won't be able to always pass the build.
Any suggestions how to fix this?
I am thinking of just removing the test for now..
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.
@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?
how about we work around this with features
? see the latest changes
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.
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 comment
The 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
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.
A couple comments
distribution/src/config/jvm.options
Outdated
|
||
# 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 locals | ||
8-:-Djava.locale.providers=SPI,JRE |
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
, not 8-
?
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 in SystemJvmOptions
* 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, it is better to stay in SystemJvmOptions
. We can always check the version running with JavaVersion.majorVersion(JavaVersion.CURRENT) == 8
to choose the right settings
…sticsearch into fix/spi_provider_jvm_option
@elasticmachine run elasticsearch-ci/2 |
…regation/310_date_agg_per_day_of_week.yml Co-Authored-By: Rory Hunter <[email protected]>
@elasticmachine run elasticsearch-ci/2 |
@elasticmachine run elasticsearch-ci/2 |
Adding back accidentally removed jvm option that is required to enforce start of the week = Monday in IsoCalendarDataProvider. Adding a `feature` to yml test in order to skip running it in JDK8 commit that removed it 398c802 commit that backports SystemJvmOptions c4fbda3 relates 7.x backport of code that enforces CalendarDataProvider use elastic#48349
Adding back accidentally removed jvm option that is required to enforce
start of the week = Monday in IsoCalendarDataProvider.
Adding a
feature
to yml test in order to skip running it in JDK8commit that removed it 398c802
commit that backports SystemJvmOptions c4fbda3
relates 7.x backport of code that enforces CalendarDataProvider use #48349