[
https://issues.apache.org/jira/browse/IGNITE-8884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexandr Shapkin reassigned IGNITE-8884:
----------------------------------------
Assignee: Alexandr Shapkin
> .NET: CachePartialUpdateException: failed to update keys (using
> Cache.PutAsync)
> -------------------------------------------------------------------------------
>
> Key: IGNITE-8884
> URL: https://issues.apache.org/jira/browse/IGNITE-8884
> Project: Ignite
> Issue Type: Bug
> Components: platforms
> Affects Versions: 2.5
> Environment: Windows 10.
> Apache Ignite 2.5.0.
> .NETFramework,Version=v4.6.1
> Packages:
> * Apache.Ignite - 2.5.0
> * Apache.Ignite.Log4Net - 2.5.0
> * Apache.Ignite.NLog - 2.5.0
> * NLog - 4.0.0
>
>
> Reporter: Roman Guseinov
> Assignee: Alexandr Shapkin
> Priority: Major
> Labels: dot_net
> Attachments: Program.cs
>
>
> The issue happens when we try to call PutAsync(KeyObject, ValueObject) where
> ValueObject's field refers to KeyObject. Reproducer is attached.
>
> {code:java}
> Apache.Ignite.Core.Cache.CachePartialUpdateException: Failed to update keys
> (retry update if possible).: [server_node.TradeId [idHash=573136580,
> hash=31459296, Number=2]]
> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
> at
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
> task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at server_node.Program.<PutGetComplexTypeAsyncSharedRef>d__2.MoveNext() in
> C:\Users\user\source\repos\IginteAsyncTest\server-node\server-node\Program.cs:line
> 61
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
> at
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
> task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at server_node.Program.Main(String[] args) in
> C:\Users\user\source\repos\IginteAsyncTest\server-node\server-node\Program.cs:line
> 22
> {code}
>
> Also, when we use the default logger, Cache.PutAsync doesn't throw an
> exception but when we try to get value back from the cache the different
> exception happens:
>
> {code:java}
> System.ArgumentException: Seek before origin: -25
> at Apache.Ignite.Core.Impl.Memory.PlatformMemoryStream.Seek(Int32 offset,
> SeekOrigin origin)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadHandleObject[T](Int32 pos,
> Type typeOverride)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type
> typeOverride)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type
> typeOverride)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadObject[T](String fieldName)
> at lambda_method(Closure , Object , IBinaryReader )
> at
> Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.ReadBinary[T](BinaryReader
> reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos,
> Type typeOverride)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type
> typeOverride)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type
> typeOverride)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadBinaryObject[T](Boolean
> doDetach)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type
> typeOverride)
> at Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type
> typeOverride)
> at Apache.Ignite.Core.Impl.Binary.Marshaller.Unmarshal[T](IBinaryStream
> stream, Boolean keepBinary)
> at Apache.Ignite.Core.Impl.PlatformJniTarget.InStreamOutLong[TR](Int32 type,
> Action`1 outAction, Func`3 inAction, Func`2 readErrorAction)
> at Apache.Ignite.Core.Impl.Cache.CacheImpl`2.Get(TK key)
> at server_node.Program.<PutGetComplexTypeAsyncSharedRef>d__2.MoveNext() in
> C:\Users\user\source\repos\IginteAsyncTest\server-node\server-node\Program.cs:line
> 62
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
> at
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
> task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at server_node.Program.Main(String[] args) in
> C:\Users\user\source\repos\IginteAsyncTest\server-node\server-node\Program.cs:line
> 22
> {code}
>
> There are two workarounds:
> # Do not use the same object as key and the value's field.
> # Put data into the cache using the synchronous method.
>
> Reproducer is attached: [^Program.cs]
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)