-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
IGNITE-23196 [ducktests] Change JVM options to JDK11 ones #11536
IGNITE-23196 [ducktests] Change JVM options to JDK11 ones #11536
Conversation
- changed default settings for gc log (-Xloggc ->-Xlog:gc) - added new logs for safepoints - added new variable to disable safepoints log - removed UnlockCommercialFeatures because it was used only for jfr, but no longer needed for openjdk11 - removed check_boolean_options__go_after_default_ones_and_overwrite_them__if_passed_via_jvm_opt, because there is no longer an option in settings - changed option in check_colon_options__go_after_default_ones_and_overwrite_them__if_passed_via_jvm_opt to -Xlog:gc
@@ -79,19 +78,10 @@ def check_default_jvm_options__are_not_used__if_merge_with_default_is_false(serv | |||
assert len(spec.jvm_opts) == 0 | |||
|
|||
|
|||
def check_boolean_options__go_after_default_ones_and_overwrite_them__if_passed_via_jvm_opt(service): |
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.
Even if the UnlockCommercialFeatures option is not used for JVM 11+ anymore it's not a reason to drop the test for the boolean options support. Just choose another boolean option. The -XX:+FlightRecorder would be ok I think.
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.
Returned the test, tweaked it to check FlightRecorder in options
@@ -102,6 +102,10 @@ def __get_default_jvm_opts(self): | |||
oom_path=os.path.join(self.service.log_dir, "out_of_mem.hprof"), | |||
vm_error_path=os.path.join(self.service.log_dir, "hs_err_pid%p.log")) | |||
|
|||
if not self.service.context.globals.get(SAFEPOINT_LOGS_DISABLED, False): | |||
default_jvm_opts = merge_jvm_settings( | |||
default_jvm_opts, ["-Xlog:safepoint:" + os.path.join(self.service.log_dir, "safepoint.log")]) |
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.
Please use more readable settings for log file like:
-Xlog:safepoint*=debug:file=/mnt/service/logs/safepoint.log:time,uptime,level,tags
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.
Done
""" | ||
Provides settings string for JVM process. | ||
param opts: JVM options to merge. Adds new or rewrites default values. Can be list or string. | ||
""" | ||
gc_dump = "" | ||
if gc_dump_path: | ||
gc_dump = "-verbose:gc -Xloggc:" + gc_dump_path | ||
gc_dump = "-Xlog:gc:" + gc_dump_path |
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.
Please use more readable settings for log file like
-Xlog:gc*=debug,gc+stats*=debug,gc+ergo*=debug:/mnt/service/logs/gc.log:uptime,time,level,tags
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.
Done
@@ -31,14 +31,14 @@ | |||
|
|||
|
|||
def create_jvm_settings(heap_size=DEFAULT_HEAP, gc_settings=JVM_PARAMS_GC_G1, generic_params=JVM_PARAMS_GENERIC, | |||
gc_dump_path=None, oom_path=None, vm_error_path=None): | |||
gc_dump_path=None, oom_path=None, vm_error_path=None,): |
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 this change?
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.
By mistake, removed it
@@ -27,6 +27,7 @@ | |||
# globals: | |||
JFR_ENABLED = "jfr_enabled" | |||
IGNITE_TEST_CONTEXT_CLASS_KEY_NAME = "IgniteTestContext" | |||
SAFEPOINT_LOGS_DISABLED = "SafePointLogsDisabled" |
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.
Please use the snake case for global variable name (in other words follow the existing approach of already existing variables: jfr_enabled, ignite_versions, jmx_remote etc.)
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.
Done
@@ -27,6 +27,7 @@ | |||
# globals: | |||
JFR_ENABLED = "jfr_enabled" | |||
IGNITE_TEST_CONTEXT_CLASS_KEY_NAME = "IgniteTestContext" | |||
SAFEPOINT_LOGS_DISABLED = "SafePointLogsDisabled" |
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.
Please also change it *_enabled (with True by default). In all other variables we have enabled but not disabled.
Say "safepoint_log_enabled".
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.
Done
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.
just for record
After all it was decided to have it False by default to not increase total logs size in results for tests which do not need it
- fixed PR threads
d1e8ac9
to
9df0689
Compare
- Added special run options to the Readme - Fixed few small issues in Readme
9df0689
to
8984375
Compare
- Fixed check_colon_options__go_after_default_ones_and_overwrite_them__if_passed_via_jvm_opt check
- Changed readme. - safepoint log now disbled by default.
modules/ducktests/README.md
Outdated
} | ||
} | ||
``` | ||
Options `key_store_jks` and `trust_store_jks` is paths. |
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.
... are paths
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.
Fixed
modules/ducktests/README.md
Outdated
} | ||
``` | ||
Options `key_store_jks` and `trust_store_jks` is paths. | ||
If you start it with `/` it will be used as an absolute path, otherwise as a relative path. |
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.
Relative to which directory ?
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.
Specified
- Changed readme.
assert spec.jvm_opts.index("-XX:-UnlockCommercialFeatures") >\ | ||
spec.jvm_opts.index("-XX:+UnlockCommercialFeatures") | ||
spec = IgniteApplicationSpec(service, jvm_opts="-XX:-FlightRecorder") | ||
assert "-XX:-FlightRecorder" in spec.jvm_opts |
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 have here 2 identical asserts.
I think one of them should be replaced with the
assert "-XX:+FlightRecorder" in spec.jvm_opts
Otherwise it doesn't make sense.
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.
Fixed
- Changed readme. - Changed test check_boolean_options__go_after_default_ones_and_overwrite_them__if_passed_via_jvm_opt
88d3c45
to
d647c0a
Compare
Quality Gate passedIssues Measures |
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summary
whereXXXX
- number of JIRA issue.(see the Maintainers list)
the
green visa
attached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email [email protected] or ask anу advice on http://asf.slack.com #ignite channel.