Skip to content

Commit 586fcc3

Browse files
authored
fix(CosmosStore): Propagate correlationId, causationId (#260)
1 parent 85f6a38 commit 586fcc3

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ The `Unreleased` section name is replaced by the expected version of next releas
6868

6969
### Fixed
7070

71+
- `Propulsion.CosmosStore.CosmosStoreSource`: Propagate `correlationId`/`causationId` [#260](https://github.com/jet/propulsion/pull/260)
7172
- `Propulsion.SqlStreamStore`: Replaced incorrect/meaningless stream name for `SqlStreamStoreSource` [#139](https://github.com/jet/propulsion/pull/139)
7273
- Synced [`AwaitTaskCorrect`](http://www.fssnip.net/7Rc/title/AsyncAwaitTaskCorrect) with official version [3c11142](https://github.com/jet/propulsion/commit/3c11142b75bf3b0ef2181fd106a4b17c0b2313ef)
7374
- `Projector`,`Ingester`,`Submitter`, `Scheduler`: Deterministic shutdown via Cancellation and/or unhandled exceptions [#154](https://github.com/jet/propulsion/pull/154)

src/Propulsion.CosmosStore/EquinoxSystemTextJsonParser.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ module EquinoxSystemTextJsonParser =
4141
batch.e |> Seq.mapi (fun offset x ->
4242
let d = batch.MapData x.d
4343
let m = batch.MapData x.m
44-
FsCodec.Core.TimelineEvent.Create(batch.i + int64 offset, x.c, d, m, timestamp = x.t, size = x.c.Length + d.Length + m.Length + 80))
44+
let inline len s = if isNull s then 0 else String.length s
45+
FsCodec.Core.TimelineEvent.Create(batch.i + int64 offset, x.c, d, m, timestamp = x.t,
46+
size = x.c.Length + d.Length + m.Length + len x.correlationId + len x.causationId + 80,
47+
correlationId = x.correlationId, causationId = x.causationId))
4548

4649
/// Attempts to parse a Document/Item from the Store
4750
/// returns ValueNone if it does not bear the hallmarks of a valid Batch, or the streamFilter predicate rejects

tools/Propulsion.Tool/Args.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ module Cosmos =
140140
| Provisioning.Database (Throughput.Manual rus) ->
141141
Log.Information("Provisioning Leases Container at {modeStr:l} level with {rus:n0} RU/s", modeStr, rus)
142142
| Provisioning.Serverless ->
143-
Log.Information("Provisioning Leases Container in {modeStr:l} mode with automatic throughput RU/s as configured in account", modeStr)
143+
Log.Information("Provisioning Leases Container in {modeStr:l} mode with throughput as defined at account level", modeStr)
144144
initAux container.Database.Client (container.Database.Id, container.Id) mode
145145
| x -> p.Raise $"unexpected subcommand %A{x}"
146146

0 commit comments

Comments
 (0)