Breaking changes in 6.2

edit

This section discusses the changes that you need to be aware of when migrating your application to Elasticsearch 6.2

All permission bootstrap check

edit

Elasticsearch installs a security manager during bootstrap to mitigate the scope of exploits in the JDK, in third-party dependencies, and in Elasticsearch itself as well as to sandbox untrusted plugins. A custom security policy can be applied and one permission that can be added to this policy is java.security.AllPermission. However, this effectively disables the security manager. As such, granting this permission in production mode is now forbidden via the all permission bootstrap check.

Private temporary directory

edit

On Linux, previous versions of Elasticsearch defaulted to using /tmp as the temporary directory for the process. However, /tmp is public so we have elected to change the packaging so that we use a private temporary directory. If you are upgrading from a previous version of Elasticsearch and preserve your existing jvm.options, you should add the line -Djava.io.tmpdir=${ES_TMPDIR}. It is safe to do this on all OS as we preserve using a private temporary directory on non-Linux systems with the same mechanism.

GC logging

edit

Starting in Elasticsearch 6.2.0, JVM GC logging is enabled out of the box. This lightweight facility gives insight into GC issues. The settings for this are in jvm.options and default to keeping 2 GB worth (rotating every 64 MB) of logs in the default logs directory. If you are upgrading from a previous version of Elasticsearch and preserve your existing jvm.options, you should add the following GC logging settings so that this valuable debugging information is available:

-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationStoppedTime
-Xloggc:logs/gc.log or /var/log/elasticsearch/gc.log 
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=32
-XX:GCLogFileSize=64m

If you have installed Elasticsearch from the RPM or the Debian packaging distributions and use the default logging location use /var/log/elasticsearch otherwise if you have installed from the tar.gz or zip archive distributions and use the default logging location use logs/gc.log; otherwise, set the location to the absolute path to your log files.

Rollover alias

edit

A rollover request in Elasticsearch 6.2.0 or later will be aborted if the same alias is found in the matching index templates. This change is to prevent the alias from pointing to multiple indices during rollover. If your index templates already contain the same alias, you should remove it by updating the index templates.