From 0aee8b02afb772dbb5604e8d04bf952b7923a700 Mon Sep 17 00:00:00 2001 From: Henning Andersen Date: Thu, 14 Mar 2019 09:27:31 +0100 Subject: [PATCH 1/4] Blob Store compress default to true Changed default of compress setting from false to true for blob store repositories. This aligns the code with documentation and also seems like the better default. --- .../migration/migrate_8_0/snapshots.asciidoc | 11 +++++++++++ .../repositories/blobstore/BlobStoreRepository.java | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/reference/migration/migrate_8_0/snapshots.asciidoc b/docs/reference/migration/migrate_8_0/snapshots.asciidoc index 52db460fa7a16..4863449e77d9a 100644 --- a/docs/reference/migration/migrate_8_0/snapshots.asciidoc +++ b/docs/reference/migration/migrate_8_0/snapshots.asciidoc @@ -11,3 +11,14 @@ The `repositories.fs.compress` setting has been removed. Instead use the repository specific `compress` setting to enable compression. See <> for information on the `compress` setting. + +[float] +==== Compression of meta data files is now default on + +Previously, the default value for `compress` was `false`. The default has been changed to `true`. This aligns the +default with documentation. + +This change will affect both newly created repositories and existing repositories where `compress=false` has not been +explicitly specified. + +For more information on the compress option, see <> diff --git a/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java b/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java index 4fee2fad41600..e71114533f3d1 100644 --- a/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java +++ b/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java @@ -199,7 +199,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp * files that are already compressed by default. Changing the setting does not invalidate existing files since reads * do not observe the setting, instead they examine the file to see if it is compressed or not. */ - public static final Setting COMPRESS_SETTING = Setting.boolSetting("compress", false, Setting.Property.NodeScope); + public static final Setting COMPRESS_SETTING = Setting.boolSetting("compress", true, Setting.Property.NodeScope); private final Settings settings; From 1216d17dae7e5c031102fe7dbf12fd2785da26a8 Mon Sep 17 00:00:00 2001 From: Henning Andersen Date: Thu, 14 Mar 2019 12:33:11 +0100 Subject: [PATCH 2/4] Blob Store compress default to true Adapted test case to new default. --- .../repositories/blobstore/BlobStoreRepositoryTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryTests.java b/server/src/test/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryTests.java index 7246b708dd168..2cad99c48bc47 100644 --- a/server/src/test/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryTests.java +++ b/server/src/test/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryTests.java @@ -254,8 +254,8 @@ private BlobStoreRepository setupRepo() { Settings.Builder repoSettings = Settings.builder().put(node().settings()).put("location", location); boolean compress = randomBoolean(); - if (compress) { - repoSettings.put(BlobStoreRepository.COMPRESS_SETTING.getKey(), true); + if (compress == false) { + repoSettings.put(BlobStoreRepository.COMPRESS_SETTING.getKey(), false); } AcknowledgedResponse putRepositoryResponse = client.admin().cluster().preparePutRepository(repositoryName) From fd7d5fed2a34293edf4c9a772f73d9570971dcb5 Mon Sep 17 00:00:00 2001 From: Henning Andersen Date: Thu, 14 Mar 2019 15:06:47 +0100 Subject: [PATCH 3/4] Blob Store compress default to true Improved breaking changes documentation. --- docs/reference/migration/migrate_8_0/snapshots.asciidoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/reference/migration/migrate_8_0/snapshots.asciidoc b/docs/reference/migration/migrate_8_0/snapshots.asciidoc index 4863449e77d9a..4a00d91e1accd 100644 --- a/docs/reference/migration/migrate_8_0/snapshots.asciidoc +++ b/docs/reference/migration/migrate_8_0/snapshots.asciidoc @@ -13,10 +13,9 @@ Instead use the repository specific `compress` setting to enable compression. Se on the `compress` setting. [float] -==== Compression of meta data files is now default on +==== Compression of meta data files is now on by default -Previously, the default value for `compress` was `false`. The default has been changed to `true`. This aligns the -default with documentation. +Previously, the default value for `compress` was `false`. The default has been changed to `true`. This change will affect both newly created repositories and existing repositories where `compress=false` has not been explicitly specified. From 20fc37fe314d23766b1184d690e94de94fe41fab Mon Sep 17 00:00:00 2001 From: Henning Andersen Date: Thu, 14 Mar 2019 16:36:20 +0100 Subject: [PATCH 4/4] Blob Store compress default to true Found more places to change in documentation. --- docs/plugins/repository-azure.asciidoc | 2 +- docs/plugins/repository-gcs.asciidoc | 2 +- docs/plugins/repository-hdfs.asciidoc | 2 +- docs/plugins/repository-s3.asciidoc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/plugins/repository-azure.asciidoc b/docs/plugins/repository-azure.asciidoc index df09b28093c80..9249efd5d1744 100644 --- a/docs/plugins/repository-azure.asciidoc +++ b/docs/plugins/repository-azure.asciidoc @@ -124,7 +124,7 @@ The Azure repository supports following settings: When set to `true` metadata files are stored in compressed format. This setting doesn't affect index files that are already compressed by default. - Defaults to `false`. + Defaults to `true`. `readonly`:: diff --git a/docs/plugins/repository-gcs.asciidoc b/docs/plugins/repository-gcs.asciidoc index e3978e65f4476..f655d29307074 100644 --- a/docs/plugins/repository-gcs.asciidoc +++ b/docs/plugins/repository-gcs.asciidoc @@ -238,7 +238,7 @@ The following settings are supported: When set to `true` metadata files are stored in compressed format. This setting doesn't affect index files that are already compressed by default. - Defaults to `false`. + Defaults to `true`. `application_name`:: diff --git a/docs/plugins/repository-hdfs.asciidoc b/docs/plugins/repository-hdfs.asciidoc index 005cc30895552..e798682a38699 100644 --- a/docs/plugins/repository-hdfs.asciidoc +++ b/docs/plugins/repository-hdfs.asciidoc @@ -62,7 +62,7 @@ The following settings are supported: `compress`:: - Whether to compress the metadata or not. (Disabled by default) + Whether to compress the metadata or not. (Enabled by default) `chunk_size`:: diff --git a/docs/plugins/repository-s3.asciidoc b/docs/plugins/repository-s3.asciidoc index 2ce6ae1121b5a..7c4e763a3b04a 100644 --- a/docs/plugins/repository-s3.asciidoc +++ b/docs/plugins/repository-s3.asciidoc @@ -211,7 +211,7 @@ The following settings are supported: When set to `true` metadata files are stored in compressed format. This setting doesn't affect index files that are already compressed by default. - Defaults to `false`. + Defaults to `true`. `server_side_encryption`::