Skip to content

Commit

Permalink
Actually use ConnectionConfiguration.DefaultMemoryStreamFactory (open…
Browse files Browse the repository at this point in the history
…search-project#552)

* 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]>
  • Loading branch information
djimenez authored Feb 26, 2024
1 parent 2d4e632 commit 8085401
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### 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))
- Fixed `ConnectionConfiguration.DefaultMemoryStreamFactory` actually used as default. ([#552](https://github.com/opensearch-project/opensearch-net/pull/552))

### Dependencies
- Bumps `Microsoft.CodeAnalysis.CSharp` from 4.2.0 to 4.6.0
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 @@ -192,9 +192,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 @@ -615,7 +614,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 8085401

Please sign in to comment.