dotnetcore / dotnetcore/EasyCaching
EasyCaching.Disk - MessagePack.MessagePackSerializationException
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 336
- PR merge metrics
- No merged PRs in 30d
Description
I use EasyCaching.Disk (v1.9.2) in a multi-threaded application. Accesses are locked.
Sometimes, when accessing the stored data, the exception listed below occurs. When this happens, I use Polly (retry with wait time) – this can fix the problem, but not always.
What could be the problem here?
> _MessagePack.MessagePackSerializationException: Failed to deserialize EasyCaching.Disk.DiskCacheValue value.
> ---> MessagePack.MessagePackSerializationException: Unexpected msgpack code 0 (positive fixint) encountered.
> at MessagePack.MessagePackReader.ThrowInvalidCode(Byte code)
> at MessagePack.MessagePackReader.g__SlowPath|57_0(MessagePackReader& self, DecodeResult readResult, UInt32& length, Int32& tokenSize)
> at MessagePack.Internal.CodeGenHelpers.ReadStringSpan(MessagePackReader& reader)
> at MessagePack.Formatters.EasyCaching_Disk_DiskCacheValueFormatter7.Deserialize(MessagePackReader& reader, MessagePackSerializerOptions options)
> at MessagePack.MessagePackSerializer.Deserialize[T](MessagePackReader& reader, MessagePackSerializerOptions options)
> --- End of inner exception stack trace ---
> at MessagePack.MessagePackSerializer.Deserialize[T](MessagePackReader& reader, MessagePackSerializerOptions options)
> at MessagePack.MessagePackSerializer.Deserialize[T](ReadOnlyMemory`1 buffer, MessagePackSerializerOptions options, CancellationToken cancellationToken)
> at EasyCaching.Serialization.MessagePack.DefaultMessagePackSerializer.Deserialize[T](Byte[] bytes)
> at EasyCaching.Disk.DefaultDiskCachingProvider.GetDiskCacheValue(String path)
> at EasyCaching.Disk.DefaultDiskCachingProvider.BaseGet[T](String cacheKey)
> at EasyCaching.Core.EasyCachingAbstractProvider.Get[T](String cacheKey)_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.