Skip to content
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

Blob Store compress default to true #40033

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/plugins/repository-azure.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`::

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/repository-gcs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`::

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/repository-hdfs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`::

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/repository-s3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`::

Expand Down
10 changes: 10 additions & 0 deletions docs/reference/migration/migrate_8_0/snapshots.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ The `repositories.fs.compress` setting has been removed.

Instead use the repository specific `compress` setting to enable compression. See <<modules-snapshots>> for information
on the `compress` setting.

[float]
==== 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 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 <<modules-snapshots>>
Original file line number Diff line number Diff line change
Expand Up @@ -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<Boolean> COMPRESS_SETTING = Setting.boolSetting("compress", false, Setting.Property.NodeScope);
public static final Setting<Boolean> COMPRESS_SETTING = Setting.boolSetting("compress", true, Setting.Property.NodeScope);

private final Settings settings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down