Skip to content

Commit

Permalink
Actually use ConnectionConfiguration.DefaultMemoryStreamFactory (#552)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
djimenez authored and Xtansia committed Feb 26, 2024
1 parent be7828a commit 904c279
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions 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 Expand Up @@ -138,4 +139,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
[1.6.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.5.0...v1.6.0
[1.5.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.4.0...v1.5.0
[1.4.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0
[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0
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 904c279

Please sign in to comment.