Skip to content

Decoding error when events spill into new dynamo row #482

@Akash-Mair

Description

@Akash-Mair

Hi guys!

I'm hoping this is a "me" issue and I'm lacking some config or haven't set something up correctly.

When I am running the eqx dump on my aggregate I am running into:

System.InvalidOperationException: Decoder ran into invalid data.
   at System.IO.Compression.BrotliStream.TryDecompress(Span`1 destination, Int32& bytesWritten)
   at System.IO.Compression.BrotliStream.Read(Span`1 buffer)
   at System.IO.Compression.BrotliStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)
   at FsCodec.Impl.brotliDecompressTo(Stream output, ReadOnlyMemory`1 data) in /_//src/FsCodec/Encoding.fs:line 34
   at FsCodec.Impl.decode@42-1.Invoke(MemoryStream output, ReadOnlyMemory`1 data)
   at FsCodec.Impl.unpack[a](FSharpFunc`2 alg, a compressedBytes) in /_//src/FsCodec/Encoding.fs:line 37
   at FsCodec.Impl.decode(ValueTuple`2 _arg1) in /_//src/FsCodec/Encoding.fs:line 42
   at FsCodec.Encoding.ToBlob(ValueTuple`2 x) in /_//src/FsCodec/Encoding.fs:line 77
   at <StartupCode$FsCodec>.$Encoding.Compressed@93-1.Invoke(ValueTuple`2 x)
   at <StartupCode$FsCodec>.$FsCodec.MapBodies@125-3.FsCodec.IEventData<'Mapped>.get_Data() in /_//src/FsCodec/FsCodec.fs:line 131
   at Equinox.Tool.Program.Dump.dumpEvents@829-5.Invoke(ITimelineEvent`1 x) in /_//tools/Equinox.Tool/Program.fs:line 840
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 508
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112
--- End of stack trace from previous location ---
   at Microsoft.FSharp.Control.AsyncResult`1.Commit() in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 453
   at Microsoft.FSharp.Control.AsyncPrimitives.QueueAsyncAndWaitForResultSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1133
   at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T](CancellationToken cancellationToken, FSharpAsync`1 computation, FSharpOption`1 timeout) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1160
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1504
   at Equinox.Tool.Program.main(String[] argv) in /_//tools/Equinox.Tool/Program.fs:line 884

I have a minimal repo setup here: https://github.com/Akash-Mair/eqx-tipping-point

Some notes:

  • I used the eqx tool to create my dynamo table
  • The issue seems to be when the events spill over into a new row

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions