Skip to content

Commit

Permalink
Actually use ConnectionConfiguration.DefaultMemoryStreamFactory (#552) (
Browse files Browse the repository at this point in the history
#560)

* actually use ConnectionConfiguration.DefaultMemoryStreamFactory

Signed-off-by: Donovan Jimenez <[email protected]>

* Add ConnectionConfiguration.DefaultMemoryStreamFactory changelog

Signed-off-by: Donovan Jimenez <[email protected]>

---------

Signed-off-by: Donovan Jimenez <[email protected]>
(cherry picked from commit 8085401)

Co-authored-by: Donovan Jimenez <[email protected]>
  • Loading branch information
Xtansia and djimenez authored Feb 26, 2024
1 parent 86bcc42 commit 3fb0de3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `.Strict(...)`, `.Verbatim(...)`, `.Name(...)` methods on `QueryContainer` to help modify contained query attributes ([#509](https://github.com/opensearch-project/opensearch-net/pull/509))

### Fixed
- Fixed `HttpConnection.ConvertHttpMethod` to support `Patch` method ([#489](https://github.com/opensearch-project/opensearch-net/pull/489))
- Fixed `IEnumerable<int?>` property mapping. ([#503](https://github.com/opensearch-project/opensearch-net/pull/503))
- Fix `HttpConnection.ConvertHttpMethod` to support `Patch` method ([#489](https://github.com/opensearch-project/opensearch-net/pull/489))
- Fixed `ConnectionConfiguration.DefaultMemoryStreamFactory` actually used as default. ([#552](https://github.com/opensearch-project/opensearch-net/pull/552))

### Dependencies
- Bumps `NSwag.Core.Yaml` from 13.19.0 to 14.0.3
Expand Down
5 changes: 2 additions & 3 deletions src/OpenSearch.Net/Configuration/ConnectionConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,8 @@ public abstract class ConnectionConfiguration<T> : IConnectionConfigurationValue
private bool _sniffOnStartup;
private bool _throwExceptions;
private bool _transferEncodingChunked;
private IMemoryStreamFactory _memoryStreamFactory = RecyclableMemoryStreamFactory.Default;
private IMemoryStreamFactory _memoryStreamFactory = DefaultMemoryStreamFactory;
private bool _enableTcpStats;
//public static IMemoryStreamFactory Default { get; } = RecyclableMemoryStreamFactory.Default;
public static IMemoryStreamFactory DefaultMemoryStreamFactory { get; } = OpenSearch.Net.MemoryStreamFactory.Default;
private bool _enableThreadPoolStats;

Expand Down Expand Up @@ -627,7 +626,7 @@ public T SkipDeserializationForStatusCodes(params int[] statusCodes) =>
public T TransferEncodingChunked(bool transferEncodingChunked = true) => Assign(transferEncodingChunked, (a, v) => a._transferEncodingChunked = v);

/// <summary>
/// The memory stream factory to use, defaults to <see cref="RecyclableMemoryStreamFactory.Default"/>
/// The memory stream factory to use, defaults to <see cref="MemoryStreamFactory.Default"/>
/// </summary>
public T MemoryStreamFactory(IMemoryStreamFactory memoryStreamFactory) => Assign(memoryStreamFactory, (a, v) => a._memoryStreamFactory = v);

Expand Down

0 comments on commit 3fb0de3

Please sign in to comment.