Skip to content

Commit

Permalink
fix(CosmosStore): Propagate correlationId, causationId
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Jun 8, 2024
1 parent 85f6a38 commit 91adc6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ The `Unreleased` section name is replaced by the expected version of next releas

### Fixed

- `Propulsion.CosmosStore.CosmosStoreSource`: Propagate `correlationId`/`causationId` [#x](https://github.com/jet/propulsion/pull/999)
- `Propulsion.SqlStreamStore`: Replaced incorrect/meaningless stream name for `SqlStreamStoreSource` [#139](https://github.com/jet/propulsion/pull/139)
- Synced [`AwaitTaskCorrect`](http://www.fssnip.net/7Rc/title/AsyncAwaitTaskCorrect) with official version [3c11142](https://github.com/jet/propulsion/commit/3c11142b75bf3b0ef2181fd106a4b17c0b2313ef)
- `Projector`,`Ingester`,`Submitter`, `Scheduler`: Deterministic shutdown via Cancellation and/or unhandled exceptions [#154](https://github.com/jet/propulsion/pull/154)
Expand Down
5 changes: 4 additions & 1 deletion src/Propulsion.CosmosStore/EquinoxSystemTextJsonParser.fs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ module EquinoxSystemTextJsonParser =
batch.e |> Seq.mapi (fun offset x ->
let d = batch.MapData x.d
let m = batch.MapData x.m
FsCodec.Core.TimelineEvent.Create(batch.i + int64 offset, x.c, d, m, timestamp = x.t, size = x.c.Length + d.Length + m.Length + 80))
let inline len s = if isNull s then 0 else String.length s
FsCodec.Core.TimelineEvent.Create(batch.i + int64 offset, x.c, d, m, timestamp = x.t,
size = x.c.Length + d.Length + m.Length + len x.correlationId + len x.causationId + 80,
correlationId = x.correlationId, causationId = x.causationId))

/// Attempts to parse a Document/Item from the Store
/// returns ValueNone if it does not bear the hallmarks of a valid Batch, or the streamFilter predicate rejects
Expand Down
2 changes: 1 addition & 1 deletion tools/Propulsion.Tool/Args.fs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module Cosmos =
| Provisioning.Database (Throughput.Manual rus) ->
Log.Information("Provisioning Leases Container at {modeStr:l} level with {rus:n0} RU/s", modeStr, rus)
| Provisioning.Serverless ->
Log.Information("Provisioning Leases Container in {modeStr:l} mode with automatic throughput RU/s as configured in account", modeStr)
Log.Information("Provisioning Leases Container in {modeStr:l} mode with throughput as defined at account level", modeStr)
initAux container.Database.Client (container.Database.Id, container.Id) mode
| x -> p.Raise $"unexpected subcommand %A{x}"

Expand Down

0 comments on commit 91adc6d

Please sign in to comment.