Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent error on serialization in aspnetcore odata 7.5.4 #61

Closed
houbi56 opened this issue Jan 5, 2021 · 5 comments
Closed

Intermittent error on serialization in aspnetcore odata 7.5.4 #61

houbi56 opened this issue Jan 5, 2021 · 5 comments
Assignees
Labels

Comments

@houbi56
Copy link

houbi56 commented Jan 5, 2021

Getting intermittent serialization errors in 7.5.4 under load, worked without issues in 7.5.2

We use a class IgnoreDefaultEntityPropertiesSerializer : ODataResourceSerializer that on CreateStructuralProperty returns null if
the value of the created ODataproperty is of primitive type and has a default value.
Prop is created by calling base.CreateStructuralProperty(structuralProperty, resourceContext);

The error happens when multiple (16) concurrent calls are made from a webpage, typically 10-20% of the time one of the calls will fail with the error:
System.InvalidOperationException: The EDM instance of type '[xxx Nullable=True]' is missing the property 'yyy'..

--
System.InvalidOperationException: The EDM instance of type '[xxx Nullable=True]' is missing the property 'yyy'.
at Microsoft.AspNet.OData.ResourceContext.GetPropertyValue(String propertyName)
at Microsoft.AspNet.OData.Formatter.Serialization.ODataResourceSerializer.CreateStructuralProperty(IEdmStructuralProperty structuralProperty, ResourceContext resourceContext)
at [ournamespace].Server.Configuration.Serialization.IgnoreDefaultEntityPropertiesSerializer.CreateStructuralProperty(IEdmStructuralProperty structuralProperty, ResourceContext resourceContext)
at Microsoft.AspNet.OData.Formatter.Serialization.ODataResourceSerializer.CreateStructuralPropertyBag(SelectExpandNode selectExpandNode, ResourceContext resourceContext)

@xuzhg
Copy link
Member

xuzhg commented Jan 6, 2021

@houbi56 Do you mind share me a repo (maybe a github repro) to dig more?

@xuzhg xuzhg self-assigned this Jan 6, 2021
@xuzhg xuzhg added the followup label Jan 6, 2021
@houbi56
Copy link
Author

houbi56 commented Jan 7, 2021

@houbi56
Copy link
Author

houbi56 commented Jan 12, 2021

@xuzhg Have you had the time to look at it?

@houbi56
Copy link
Author

houbi56 commented Jan 14, 2021

See OData/WebApi#2390

@houbi56
Copy link
Author

houbi56 commented Jan 20, 2021

Confirm fixed in #2397

@houbi56 houbi56 closed this as completed Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants