Skip to content

Implement disable_chucked_encoding s3 repository setting. #4146

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

Merged
merged 1 commit into from
Oct 17, 2019
Merged
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
17 changes: 17 additions & 0 deletions src/Nest/Modules/SnapshotAndRestore/Repositories/S3Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ public interface IS3RepositorySettings : IRepositorySettings
/// </summary>
[DataMember(Name = "path_style_access")]
bool? PathStyleAccess { get; set; }

/// <summary>
/// Whether chunked encoding should be disabled or not. If false, chunked encoding is enabled and will be used where appropriate.
/// If true, chunked encoding is disabled and will not be used, which may mean that snapshot operations consume more resources
/// and take longer to complete. It should only be set to true if you are using a storage service that does not support chunked
/// encoding. Defaults to false.
/// </summary>
[DataMember(Name = "disable_chunked_encoding")]
bool? DisableChunkedEncoding { get; set; }
}

/// <inheritdoc />
Expand Down Expand Up @@ -138,6 +147,9 @@ internal S3RepositorySettings() { }

/// <inheritdoc />
public bool? PathStyleAccess { get; set; }

/// <inheritdoc />
public bool? DisableChunkedEncoding { get; set; }
}

/// <inheritdoc cref="IS3RepositorySettings"/>
Expand All @@ -156,6 +168,7 @@ public class S3RepositorySettingsDescriptor
bool? IS3RepositorySettings.ServerSideEncryption { get; set; }
string IS3RepositorySettings.StorageClass { get; set; }
bool? IS3RepositorySettings.PathStyleAccess { get; set; }
bool? IS3RepositorySettings.DisableChunkedEncoding { get; set; }

/// <inheritdoc cref="IS3RepositorySettings.Bucket" />
public S3RepositorySettingsDescriptor Bucket(string bucket) => Assign(bucket, (a, v) => a.Bucket = v);
Expand Down Expand Up @@ -188,6 +201,10 @@ public S3RepositorySettingsDescriptor ServerSideEncryption(bool? serverSideEncry
/// <inheritdoc cref="IS3RepositorySettings.PathStyleAccess" />
public S3RepositorySettingsDescriptor PathStyleAccess(bool? pathStyleAccess = true) =>
Assign(pathStyleAccess, (a, v) => a.PathStyleAccess = v);

/// <inheritdoc cref="IS3RepositorySettings.DisableChunkedEncoding" />
public S3RepositorySettingsDescriptor DisableChunkedEncoding(bool? disableChunkedEncoding = true) =>
Assign(disableChunkedEncoding, (a, v) => a.DisableChunkedEncoding = v);
}

/// <inheritdoc cref="IS3Repository"/>
Expand Down