Skip to content

Deserialization in parallel causes invalid objects #4791

Closed
@HarelM

Description

@HarelM

NEST/Elasticsearch.Net version: 5.6.6

Elasticsearch version: 5.6.3

Description of the problem including expected versus actual behavior:
Actual:
When deserializing a GeoJson object using NTS the properties data is duplicated from one entity to the other.
Expected: Data should not "leak".

Steps to reproduce:

  1. Query the database using search in parallel
  2. Test the results
    It doesn't happen all the time, it happens from time to time which I believe is related to timing and multithread stuff...
    Code can be seen here:
    https://github.com/IsraelHikingMap/Site/blob/master/IsraelHiking.DataAccess/ElasticSearchGateway.cs#L381L401

Expected behavior
There shouldn't be a "memory override"

Provide ConnectionSettings (if relevant):
https://github.com/IsraelHikingMap/Site/blob/master/IsraelHiking.DataAccess/ElasticSearchGateway.cs#L66L75
Most of the info can be found in the following thread, I don't know if the problem is here or in the deserialization code in the NTS library... :-(
The comment below and afterwards is the relevant discussion.
There are also elastic dump there.
NetTopologySuite/NetTopologySuite.IO.GeoJSON#46 (comment)

Provide DebugInformation (if relevant):
Can be found in the above issue.

Any help would be greatly appreciated. Running on .net core 3.1 windows server 2012 R2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions