SenseNet / sensenet

Open Source Content Services Platform written in .NET
https://sensenet.com
GNU General Public License v2.0
173 stars 111 forks source link

Concurrent update ERROR in the NodeData #2026

Closed kavics closed 4 months ago

kavics commented 5 months ago

The following exception was thrown during the NLB test under heavy load:


InvalidOperationException:
Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
   at SenseNet.ContentRepository.Storage.NodeData.
PreloadTextPropertiesAsync(CancellationToken cancel) in D:\Dev\github\sensenet\src\Storage\NodeData.cs:line 821
   at SenseNet.ContentRepository.Storage.NodeData.LoadProperty(PropertyType propertyType) in D:\Dev\github\sensenet\src\Storage\NodeData.cs:line 785
   at SenseNet.ContentRepository.Storage.NodeData.GetDynamicRawData(PropertyType propertyType) in D:\Dev\github\sensenet\src\Storage\NodeData.cs:line 585
   at SenseNet.ContentRepository.Storage.Node.get_Item(PropertyType propertyType) in D:\Dev\github\sensenet\src\Storage\Node.cs:line 1162
   at SenseNet.ContentRepository.Storage.Node.get_Item(String propertyName) in D:\Dev\github\sensenet\src\Storage\Node.cs:line 1106
   at SenseNet.ContentRepository.GenericContent.GetProperty(String name) in D:\Dev\github\sensenet\src\ContentRepository\GenericContent.cs:line 860
   at SenseNet.ContentRepository.FileBase.GetProperty(String name) in D:\Dev\github\sensenet\src\ContentRepository\FileBase.cs:line 111
   at SenseNet.ContentRepository.File.GetProperty(String name) in D:\Dev\github\sensenet\src\ContentRepository\File.cs:line 142
   at SenseNet.ContentRepository.Field.ReadProperty(String propertyName) in D:\Dev\github\sensenet\src\ContentRepository\Field.cs:line 196
   at SenseNet.ContentRepository.Field.ReadProperties() in D:\Dev\github\sensenet\src\ContentRepository\Field.cs:line 183
   at SenseNet.ContentRepository.Field.get_Value() in D:\Dev\github\sensenet\src\ContentRepository\Field.cs:line 138
   at SenseNet.ContentRepository.Field.GetData(Boolean localized) in D:\Dev\github\sensenet\src\ContentRepository\Field.cs:line 271
   at SenseNet.ContentRepository.Fields.RichTextField.GetData(Boolean localized) in D:\Dev\github\sensenet\src\ContentRepository\Fields\RichTextField.cs:line 206
   at SenseNet.ContentRepository.Field.GetData() in D:\Dev\github\sensenet\src\ContentRepository\Field.cs:line 262
   at SenseNet.OData.Projector.GetJsonObject(Field field, String selfUrl, ODataRequest oDataRequest) in D:\Dev\github\sensenet\src\OData\Projector.cs:line 184
   at SenseNet.OData.SimpleExpanderProjector.Project(Content content, List`1 expandTree, HttpContext httpContext) in D:\Dev\github\sensenet\src\OData\SimpleExpanderProjector.cs:line 111
   at SenseNet.OData.SimpleExpanderProjector.Project(Content content, HttpContext httpContext) in D:\Dev\github\sensenet\src\OData\SimpleExpanderProjector.cs:line 86
   at SenseNet.OData.Writers.ODataWriter.CreateFieldDictionary(Content content, Projector projector, HttpContext httpContext) in D:\Dev\github\sensenet\src\OData\Writers\ODataWriter.cs:line 950
   at SenseNet.OData.Writers.ODataWriter.ProcessOperationQueryResponse(ChildrenDefinition qdef, ODataRequest req, HttpContext httpContext, Int32& count) in D:\Dev\github\sensenet\src\OData\Writers\ODataWriter.cs:line 639
   at SenseNet.OData.Writers.ODataWriter.WriteChildrenCollectionAsync(String path, HttpContext httpContext, ODataRequest req) in D:\Dev\github\sensenet\src\OData\Writers\ODataWriter.cs:line 207
   at SenseNet.OData.ODataMiddleware.ProcessRequestAsync(HttpContext httpContext, ODataRequest odataRequest) in D:\Dev\github\sensenet\src\OData\ODataMiddleware.cs:line 200```