SIGSEGV when indexing nullable value tuple with value
See original GitHub issueNEST/Elasticsearch.Net version: 7.6.1/7.7
Elasticsearch version: 7.6.2
Runtime/OS info dotnet 3.1.201 on Mac OS X 10.14.4 (BuildVersion: 18E226)
Description of the problem including expected versus actual behavior:
Indexing a document that contains a property that is a nullable value tuple such as (string info, int number)?
with a value that is not null produces a SIGSEGV
and the whole application crashes.
Steps to reproduce:
The issue can be reproduced with the following code:
using System;
using Nest;
public class ExampleDoc {
public (string info, int number)? tupleNullable { get; set; }
}
public class Program {
public static void Main() {
var node = new Uri("http://localhost:9200");
var client = new ElasticClient(new ConnectionSettings(node));
var doc = new ExampleDoc {
tupleNullable = ("somestring", 42),
};
var indexName= "index4";
client.Indices.Create(indexName, index => index
.Map<ExampleDoc>(m => m
.AutoMap()
));
client.Index(doc, i => i.Index(indexName));
}
}
Expected behavior The expected bahavior is to either throw an exception if this usecase is not supported or to successfully index the document
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Access members of nullable ValueTuple?
To access an item for a Nullable<ValueTuple<>> you should use the Null-conditional operators ?. operator, and the null-coalescing operator ...
Read more >No warning about null when return default with tuple
The tuple itself is not null -- it cannot be, as it is a value type. Only `tuple.Item1` is null, as it is...
Read more >What's new in 1.4.0 (January 22, 2022)
Inconsistent date string parsing# · Ignoring dtypes in concat with empty or all-NA columns# · Null-values are no longer coerced to NaN-value in...
Read more >MySQL bugs fixed by Aurora MySQL database engine ...
Fixed an issue where incorrect AUTO_INCREMENT values were generated when the maximum integer column value was exceeded. The error was due to the...
Read more >Null Value & is Operator - Advanced Programming ...
The null value; The is operator; The !is operator. We know that a variable of a reference type needs not reference a particular...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@xsoheilalizadeh
StringValues
are not currently supported. It might be best to open a new issue for this to discuss 👍This is now fixed and nullable ValueTuples supported in 7.7.1