You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elasticsearch.Net: 6.0.0 through 6.5.0. Does not reproduce on 5.6.5.
Elasticsearch version: 6.6.0
When using the VoidResponse response type, each request returns the same VoidResponse instance, modifying its ApiCall property. For StringResponse, BytesResponse and DynamicResponse a new instance is returned. Using a different ElasticLowLevelClient instance does not change this behavior. Here's a small demonstration:
var connectionConfiguration = new ConnectionConfiguration(
new SingleNodeConnectionPool(new Uri("http://127.0.0.1:9200")),
new HttpConnection());
var client = new ElasticLowLevelClient(connectionConfiguration);
var voidResponse1 = await client.IndicesCreateAsync<VoidResponse>("foo", null);
var originalApiCall = voidResponse1.ApiCall;
Console.WriteLine($"{voidResponse1.HttpMethod}"); // PUT
var voidResponse2 = await client.IndicesDeleteAsync<VoidResponse>("foo");
var modifiedApiCall = voidResponse1.ApiCall;
Console.WriteLine($"{voidResponse1.HttpMethod}"); // DELETE
Console.WriteLine($"{ReferenceEquals(voidResponse1, voidResponse2)}"); // true
Console.WriteLine($"{ReferenceEquals(originalApiCall, modifiedApiCall)}"); // false
var stringResponse1 = await client.IndicesCreateAsync<StringResponse>("foo", null);
var stringResponse2 = await client.IndicesDeleteAsync<StringResponse>("foo");
Console.WriteLine($"{ReferenceEquals(stringResponse1, stringResponse2)}"); // false
var byteResponse1 = await client.IndicesCreateAsync<BytesResponse>("foo", null);
var byteResponse2 = await client.IndicesDeleteAsync<BytesResponse>("foo");
Console.WriteLine($"{ReferenceEquals(byteResponse1, byteResponse2)}"); // false
var dynamicResponse1 = await client.IndicesCreateAsync<DynamicResponse>("foo", null);
var dynamicResponse2 = await client.IndicesDeleteAsync<DynamicResponse>("foo");
Console.WriteLine($"{ReferenceEquals(dynamicResponse1, dynamicResponse2)}"); // false
The text was updated successfully, but these errors were encountered:
Elasticsearch.Net: 6.0.0 through 6.5.0. Does not reproduce on 5.6.5.
Elasticsearch version: 6.6.0
When using the VoidResponse response type, each request returns the same VoidResponse instance, modifying its ApiCall property. For StringResponse, BytesResponse and DynamicResponse a new instance is returned. Using a different ElasticLowLevelClient instance does not change this behavior. Here's a small demonstration:
The text was updated successfully, but these errors were encountered: