Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CosmosStore.Linq): Indexed Queries #450

Open
wants to merge 56 commits into
base: cosmos-fscodec-compression
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
cccc7bb
Typos/formatting
bartelink Aug 1, 2024
5893044
feat(CosmosStore.Linq): Indexed Queries
bartelink Mar 28, 2024
4e7a428
CL
bartelink Mar 28, 2024
1e48f21
Dependency tweaks
bartelink Mar 28, 2024
8ad198c
Tweak example queries
bartelink Mar 28, 2024
29ec5c4
4.1.0-alpha.1
bartelink Mar 28, 2024
d80ddf9
Add missing Disposal
bartelink Mar 29, 2024
7298b12
Polish
bartelink Mar 30, 2024
55f68b2
Simplify
bartelink Mar 30, 2024
a0f7fde
Comments
bartelink Mar 30, 2024
ecd191d
Tweaks
bartelink Mar 31, 2024
9c52bfb
Move extensions back to type
bartelink Mar 31, 2024
575ef4e
Predicate finessing, log fixes
bartelink Apr 4, 2024
4d83e8c
RU Format tweak
bartelink Apr 4, 2024
6320e99
Add OrderByLambda; Explicate OrderByPropertyName
bartelink Apr 5, 2024
6d8da93
deps: Update Min Equinox ver to 4.0.2
bartelink Apr 8, 2024
446c77a
Add metrics wiring
bartelink Apr 8, 2024
fdad5da
Release 4.1.0-alpha.6
bartelink Apr 8, 2024
08b9abb
fix log arg
bartelink Apr 9, 2024
70b83f7
Add queryLogLevel 4.1.0-alpha.7
bartelink Apr 22, 2024
532102c
Format latency as n0 per rest of system
bartelink Apr 23, 2024
497c562
Release 4.1.0-alpha.9
bartelink May 8, 2024
1af541b
Tidy
bartelink May 24, 2024
4dddedd
Consolidate log/enum
bartelink Jun 4, 2024
75e61bc
Tidy
bartelink Jun 4, 2024
6186487
Log polish
bartelink Jun 4, 2024
ca1fc27
feat: eqx top
bartelink Jun 5, 2024
373d089
Sorting, C+C, D+M, unsorted
bartelink Jun 7, 2024
2ed3bea
Tidy
bartelink Jun 7, 2024
0aac792
CL
bartelink Jun 8, 2024
a6b3312
Destroy skeleton
bartelink Jun 12, 2024
47c9b58
Implement deletion
bartelink Jun 12, 2024
f840f66
Polish
bartelink Jun 12, 2024
500cd08
Add Custom SQL mode
bartelink Jun 13, 2024
cefb8b9
Ignore other people helping
bartelink Jun 14, 2024
74dfca5
Parallelize deletion
bartelink Jun 28, 2024
d5796c3
CL/tidy
bartelink Jun 28, 2024
6014781
Extend readme
bartelink Jun 28, 2024
8574d8b
fix category counting
bartelink Jul 2, 2024
355cf6b
Add Stream Count
bartelink Jul 3, 2024
ed87ae0
Default 9999
bartelink Jul 3, 2024
412cb5e
Tidy
bartelink Jul 3, 2024
25f8240
Move Streams first
bartelink Jul 3, 2024
58ba071
Tidy
bartelink Jul 3, 2024
97659ca
fix Limits logic
bartelink Jul 18, 2024
241fcbf
Release 4.1.0-alpha.14
bartelink Jul 3, 2024
438f2ed
Count unfolds/unfolded
bartelink Jul 23, 2024
8e887f1
fix(Stats)!: Count Resync as read
bartelink Jul 23, 2024
6e08b09
fix(stats): Relabel Documents -> Items
bartelink Jul 23, 2024
5f29db9
fix(eqx stats): Handle newest/oldest when empty
bartelink Jul 31, 2024
48d48aa
Silence Page log in -Q mode
bartelink Aug 2, 2024
c37dc4a
Add -sl; Polish -Q dump
bartelink Aug 14, 2024
2213169
Cover TryLoad/TryHydrateTip logic
bartelink Jan 1, 2025
3ac10f1
Release 4.1.0-alpha.18
bartelink Jan 3, 2025
2b7dc75
Target FsCodec a14
bartelink Jan 4, 2025
fb963b6
Release 4.1.0-alpha.20
bartelink Jan 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ The `Unreleased` section name is replaced by the expected version of next releas

## [Unreleased]

### Added
### Changed
### Removed
### Fixed

<a name="4.1.0"></a>
## 4.1.0 - 2025

### Added

- `Equinox.CosmosStore`: Roundtrip `D` and `M` encoding values as per `DynamoStore`, enabling more extensive control of compression [#472](https://github.com/jet/equinox/pull/472)
Expand All @@ -17,11 +25,18 @@ The `Unreleased` section name is replaced by the expected version of next releas
- `Equinox.CosmosStore`: Support Ingesting unfolds [#460](https://github.com/jet/equinox/pull/460)
- `Equinox.CosmosStore.EventsContext.Sync`: Support syncing of unfolds [#460](https://github.com/jet/equinox/pull/460)
- `eqx stats`: `-O`, `-N` flags extract oldest and newest `_ts` within a store [#459](https://github.com/jet/equinox/pull/459)
- `eqx stats`: `-U` flag to count streams with unfolds and total number thereof; `-I` alias relabel Documents as Items [#464](https://github.com/jet/equinox/pull/464)
- `eqx stats`: `-I` flag; relabel Documents as Items, retaining existing `-D` flag [#464](https://github.com/jet/equinox/pull/464)
- `eqx`: `-Q` flag omits timestamps from console output logging [#459](https://github.com/jet/equinox/pull/459)
- `Equinox.CosmosStore.Linq`: Add LINQ querying support for Indexed `u`nfolds (`AccessStrategy.Custom`+`CosmosStoreCategory.shouldCompress`) [#450](https://github.com/jet/equinox/pull/450)
- `eqx dump`, `eqx query`: `-sl` Support for specifying streams to dump via a [CosmosDB `LIKE` expression](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/keywords#like) [#450](https://github.com/jet/equinox/pull/450)
- `eqx dump`: `-Q` strips intervals, regularizes snapshots, logs stream names [#450](https://github.com/jet/equinox/pull/450)
- `eqx top`: Support for analyzing space usage for event and view containers by category and/or stream [#450](https://github.com/jet/equinox/pull/450)
- `eqx destroy`: Support for deleting the items(documents) underlying a category/stream/arbitrary `WHERE` clause [#450](https://github.com/jet/equinox/pull/450)

### Changed

- `Equinox.*Store`,`Equinox.*Store.Prometheus`: Pin `Equinox` dependencies to `[4.0.0, 5.0.0)`] [#448](https://github.com/jet/equinox/pull/448)
- `Equinox.*Store`,`Equinox.*Store.Prometheus`: Pin `Equinox` dependencies to `[4.0.3, 5.0.0)`] [#450](https://github.com/jet/equinox/pull/450)
- `Equinox.CosmosStore`: Update `System.Text.Json` dep to `6.0.10` per [CVE-2024-43485](https://github.com/advisories/GHSA-8g4q-xg66-9fp4) [#470](https://github.com/jet/equinox/pull/470)
- `Equinox.CosmosStore`: Minimum `Microsoft.Azure.Cosmos` requirement updated to `3.43.0` to avail of integrated `System.Text.Json` support [#467](https://github.com/jet/equinox/pull/467)
- `Equinox.CosmosStore.CosmosStoreConnector`: Removed mandatory `requestTimeout` argument [#467](https://github.com/jet/equinox/pull/467)
Expand Down Expand Up @@ -790,7 +805,8 @@ The `Unreleased` section name is replaced by the expected version of next releas

(For information pertaining to earlier releases, see release notes in https://github.com/jet/equinox/releases and/or can someone please add it!)

[Unreleased]: https://github.com/jet/equinox/compare/4.0.4...HEAD
[Unreleased]: https://github.com/jet/equinox/compare/4.1.0...HEAD
[4.1.0]: https://github.com/jet/equinox/compare/4.0.4...4.1.0
[4.0.4]: https://github.com/jet/equinox/compare/4.0.3...4.0.4
[4.0.3]: https://github.com/jet/equinox/compare/4.0.2...4.0.3
[4.0.2]: https://github.com/jet/equinox/compare/4.0.0...4.0.2
Expand Down
78 changes: 75 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ The components within this repository are delivered as multi-targeted Nuget pack

- `Equinox.Core` [![NuGet](https://img.shields.io/nuget/v/Equinox.Core.svg)](https://www.nuget.org/packages/Equinox.Core/): Hosts generic utility types frequently useful alongside Equinox: [`TaskCell`](https://github.com/jet/equinox/blob/master/src/Equinox.Core/TaskCell.fs#L36), [`Batcher`, `BatcherCache`, `BatcherDictionary`](https://github.com/jet/equinox/blob/master/src/Equinox.Core/Batching.fs#L44). ([depends](https://www.fuget.org/packages/Equinox.Core) on `System.Runtime.Caching`)
- `Equinox.MemoryStore` [![MemoryStore NuGet](https://img.shields.io/nuget/v/Equinox.MemoryStore.svg)](https://www.nuget.org/packages/Equinox.MemoryStore/): In-memory store for integration testing/performance base-lining/providing out-of-the-box zero dependency storage for examples. ([depends](https://www.fuget.org/packages/Equinox.MemoryStore) on `Equinox`)
- `Equinox.CosmosStore` [![CosmosStore NuGet](https://img.shields.io/nuget/v/Equinox.CosmosStore.svg)](https://www.nuget.org/packages/Equinox.CosmosStore/): Azure CosmosDB Adapter with integrated 'unfolds' feature, facilitating optimal read performance in terms of latency and RU costs, instrumented to meet Jet's production monitoring requirements. ([depends](https://www.fuget.org/packages/Equinox.CosmosStore) on `Equinox`, `Equinox`, `Microsoft.Azure.Cosmos` >= `3.43.1`, `System.Text.Json`, `FSharp.Control.TaskSeq`)
- `Equinox.CosmosStore` [![CosmosStore NuGet](https://img.shields.io/nuget/v/Equinox.CosmosStore.svg)](https://www.nuget.org/packages/Equinox.CosmosStore/): Azure CosmosDB Adapter with integrated 'unfolds' feature, facilitating optimal read performance in terms of latency and RU costs, instrumented to meet Jet's production monitoring requirements. ([depends](https://www.fuget.org/packages/Equinox.CosmosStore) on `Equinox` v `4.0.3`, `Equinox`, `Microsoft.Azure.Cosmos` >= `3.43.1`, `System.Text.Json`, `FSharp.Control.TaskSeq`)
- `Equinox.CosmosStore.Prometheus` [![CosmosStore.Prometheus NuGet](https://img.shields.io/nuget/v/Equinox.CosmosStore.Prometheus.svg)](https://www.nuget.org/packages/Equinox.CosmosStore.Prometheus/): Integration package providing a `Serilog.Core.ILogEventSink` that extracts detailed metrics information attached to the `LogEvent`s and feeds them to the `prometheus-net`'s `Prometheus.Metrics` static instance. ([depends](https://www.fuget.org/packages/Equinox.CosmosStore.Prometheus) on `Equinox.CosmosStore`, `prometheus-net >= 3.6.0`)
- `Equinox.DynamoStore` [![DynamoStore NuGet](https://img.shields.io/nuget/v/Equinox.DynamoStore.svg)](https://www.nuget.org/packages/Equinox.DynamoStore/): Amazon DynamoDB Adapter with integrated 'unfolds' feature, facilitating optimal read performance in terms of latency and RC costs, patterned after `Equinox.CosmosStore`. ([depends](https://www.fuget.org/packages/Equinox.DynamoStore) on `Equinox`, `FSharp.AWS.DynamoDB` >= `0.12.0-beta`, `FSharp.Control.TaskSeq`)
- `Equinox.DynamoStore.Prometheus` [![DynamoStore.Prometheus NuGet](https://img.shields.io/nuget/v/Equinox.DynamoStore.Prometheus.svg)](https://www.nuget.org/packages/Equinox.DynamoStore.Prometheus/): Integration package providing a `Serilog.Core.ILogEventSink` that extracts detailed metrics information attached to the `LogEvent`s and feeds them to the `prometheus-net`'s `Prometheus.Metrics` static instance. ([depends](https://www.fuget.org/packages/Equinox.CosmosStore.Prometheus) on `Equinox.DynamoStore`, `prometheus-net >= 3.6.0`)
Expand Down Expand Up @@ -390,7 +390,7 @@ While Equinox is implemented in F#, and F# is a great fit for writing event-sour

# use a wild card (LIKE) for the stream name
eqx query -cl '$Us%' -un Snapshotted cosmos -d db -c $EQUINOX_COSMOS_VIEWS -b 100000
# > Querying Default: SELECT c.u, c.p, c._etag FROM c WHERE c.p LIKE "$Us%" AND EXISTS (SELECT VALUE u FROM u IN c.u WHERE u.c = "Snapshotted") {}
# > Querying Default: SELECT c.p, c._etag, c.u[0].d FROM c WHERE c.p LIKE "$Us%" AND EXISTS (SELECT VALUE u FROM u IN c.u WHERE u.c = "Snapshotted") {}
# > Page 7166s, 7166u, 0e 320.58RU 3.9s {}
# > Page 1608s, 1608u, 0e 68.59RU 0.9s {}
# > TOTALS 1c, 8774s, 389.17RU 4.7s {}
Expand All @@ -403,7 +403,7 @@ While Equinox is implemented in F#, and F# is a great fit for writing event-sour

# add criteria filtering based on an Uncompressed Unfold
eqx query -cn '$User' -un EmailIndex -uc 'u.d.email = "[email protected]"' cosmos -d db -c $EQUINOX_COSMOS_VIEWS -b 100000
# > Querying Default: SELECT c.u, c.p, c._etag FROM c WHERE c.p LIKE "$User-%" AND EXISTS (SELECT VALUE u FROM u IN c.u WHERE u.c = "EmailIndex" AND u.d.email = "[email protected]") {}
# > Querying Default: SELECT c.p, c._etag, c.u[0].d FROM c WHERE c.p LIKE "$User-%" AND EXISTS (SELECT VALUE u FROM u IN c.u WHERE u.c = "EmailIndex" AND u.d.email = "[email protected]") {}
# > Page 0s, 0u, 0e 2.8RU 0.7s {}
# > TOTALS 0c, 0s, 2.80RU 0.7s {} # 👈 only 2.8RU if nothing is returned

Expand All @@ -430,6 +430,78 @@ While Equinox is implemented in F#, and F# is a great fit for writing event-sour
# > Page 2903s, 601u, 3188e 107.53RU 3.1s 4.0MiB age 0004.05:24:51 {}
# > Page 2638s, 316u, 3019e 93.09RU 2.5s 3.4MiB age 0000.05:08:38 {}
# > TOTALS 11c, 206,356s, 7,886.75RU R/W 290.4/290.4MiB 225.3s {}

# Prepare a breakdown of which categories are using the most capacity within the store
eqx -Q top cosmos -d db -c $EQUINOX_COSMOS_CONTAINER
# Page 3276>3276i 3276s 0e 3991u 4.00>4.00<4.22MiB 103.74RU 3.5s D+M 5.1 C+C 0.00 201ms age 0000.00:33:13 {}
# Page 3177>3177i 3177s 0e 4593u 4.00>4.01<4.20MiB 105.22RU 3.2s D+M 4.7 C+C 0.00 146ms age 0000.02:23:48 {}
# Page 2708>2708i 2708s 0e 5044u 4.00>4.00<4.19MiB 105.76RU 3.4s D+M 4.5 C+C 0.00 84ms age 0002.23:10:55 {}
...
# Page 4334>4334i 4334s 0e 5038u 4.00>4.00<4.19MiB 112.59RU 2.9s D+M 4.2 C+C 0.00 109ms age 0000.00:00:59 {}
# Page 1637>1637i 1637s 0e 2939u 2.40>2.41<2.52MiB 64.12RU 1.7s D+M 2.5 C+C 0.00 39ms age 0000.00:18:03 {}
# TOTALS 47,200i 9c 47,200s 0e 79,262u read 0.1GiB output 0.1GiB JSON 0.1GiB D+M(inflated) 0.1GiB C+C 0.00MiB Parse 1.516s Total 1,750.73RU 54.2s {}
# 24064i 40.75MiB E 0 0.0 U 48128 33.6 D+M 35.0 C+C 0.0 $Friend {}
# 6372i 13.18MiB E 0 0.0 U 12744 11.4 D+M 23.9 C+C 0.0 $Tenant {}
# 6374i 5.41MiB E 0 0.0 U 6374 3.6 D+M 5.4 C+C 0.0 $Role0 {}
# 5992i 5.09MiB E 0 0.0 U 5992 3.4 D+M 5.1 C+C 0.0 $Role {}
# 1574i 1.95MiB E 0 0.0 U 1574 1.5 D+M 2.0 C+C 0.0 $Permission {}
# 1575i 1.79MiB E 0 0.0 U 3150 1.3 D+M 1.2 C+C 0.0 $User {}
# 445i 0.51MiB E 0 0.0 U 483 0.4 D+M 0.8 C+C 0.0 $Invoice3 {}
# 410i 0.46MiB E 0 0.0 U 423 0.3 D+M 0.8 C+C 0.0 $Invoice2 {}
# 394i 0.44MiB E 0 0.0 U 394 0.3 D+M 0.7 C+C 0.0 $Invoice {}

# Drill into the Friend data (different test data to preceding article)
eqx top -cn '$Friend' cosmos -d db -c $EQUINOX_COSMOS_CONTAINER
# Page 4787>4787i 4787s 0e 4787u 4.00>4.00<4.19MiB 218.54RU 3.6s D+M 4.5 C+C 0.00 259ms age 0013.22:52:15 {}
# Page 4955>4955i 4955s 0e 4955u 4.00>4.00<4.19MiB 200.20RU 3.2s D+M 4.1 C+C 0.00 202ms age 0013.22:52:18 {}
# Page 4715>4715i 4715s 0e 4715u 4.00>4.00<4.21MiB 201.26RU 3.2s D+M 4.4 C+C 0.00 145ms age 0013.22:52:22 {}
# Page 4884>4884i 4884s 0e 4884u 4.00>4.00<4.20MiB 198.97RU 3.2s D+M 4.1 C+C 0.00 95ms age 0013.22:52:31 {}
# Page 4620>4620i 4620s 0e 4620u 4.00>4.00<4.20MiB 194.76RU 3.0s D+M 4.7 C+C 0.00 140ms age 0013.22:52:28 {}
# Page 4840>4840i 4840s 0e 4840u 4.00>4.00<4.19MiB 198.43RU 3.2s D+M 4.2 C+C 0.00 136ms age 0013.22:52:34 {}
# Page 4791>4791i 4791s 0e 4791u 4.00>4.00<4.21MiB 200.20RU 3.0s D+M 4.2 C+C 0.00 137ms age 0014.02:23:24 {}
# Page 3906>3906i 3906s 0e 3906u 3.01>3.02<3.15MiB 158.28RU 2.6s D+M 2.9 C+C 0.00 142ms age 0013.23:13:51 {}
# TOTALS 37,498i 1c 37,498s 0e 37,498u read 0.0GiB output 0.0GiB JSON 0.0GiB D+M(inflated) 0.0GiB C+C 0.00MiB Parse 1.264s Total 1,570.64RU 30.0s {}
# 37498i 32.55MiB E 0 0.1 U 37498 21.7 D+M 33.2 C+C 0.0 $Friend {}

# DRY RUN of deleting (note no `-f` supplied)
eqx destroy -cn '$Friend' cosmos -d db -c $EQUINOX_COSMOS_CONTAINER
# W Dry-run of deleting items based on SELECT c.p, c.id, ARRAYLENGTH(c.e) AS es, ARRAYLENGTH(c.u) AS us FROM c WHERE c.p LIKE "$Friend%" {}
# I Page 9999> 9999i 9999s 0e 9999u 8.21>0.76 415.07RRU 1.4s 0.00WRU/s 0.0s {}
# I Page 9999> 9999i 9999s 0e 9999u 8.48>0.76 404.70RRU 0.8s 0.00WRU/s 0.0s {}
# I Page 9999> 9999i 9999s 0e 9999u 8.32>0.76 395.36RRU 1.1s 0.00WRU/s 0.0s {}
# I Page 7501> 7501i 7501s 0e 7501u 6.01>0.57 299.60RRU 1.0s 0.00WRU/s 0.0s {}
# I TOTALS 37,498i 1c 37,498s 0e 37,498u read 31.0MiB output 2.9MiB 1,514.73RRU Avg 0.00WRU/s Delete 0.00WRU Total 7.8s {}

# Whack them (note the `--force` supplied)
eqx destroy -cn '$Friend' --force cosmos -d db -c $EQUINOX_COSMOS_CONTAINER
# W DESTROYING all Items WHERE c.p LIKE "$ResourceRole%" {}
# I .. Deleted 6347i 6347s 0e 6347u 1,671.52WRU/s 30.0s {}
# I Page 9999> 9999i 9999s 0e 9999u 8.21>0.76 415.17RRU 1.2s 1,678.54WRU/s 47.2s {}
# I .. Deleted 6363i 6363s 0e 6363u 1,703.29WRU/s 30.0s {}
# I Page 9999> 9999i 9999s 0e 9999u 8.48>0.76 404.70RRU 1.1s 1,685.49WRU/s 47.8s {}
# I .. Deleted 6001i 6001s 0e 6001u 1,571.94WRU/s 30.0s {}
# I Page 9999> 9999i 9999s 0e 9999u 8.32>0.76 395.36RRU 1.0s 1,582.18WRU/s 50.1s {}
^C

# Get impatient; up the concurrency (-w 192) from the default 32 (note the `--force` supplied)
eqx destroy -cn '$Friend' --force -w 192 cosmos -d db -c $EQUINOX_COSMOS_CONTAINER
# W DESTROYING all Items WHERE c.p LIKE "$ResourceRole%" {}
# I Page 3946> 3946i 3946s 0e 3946u 3.05>0.30 176.23RRU 0.8s 5,107.71WRU/s 6.1s {}
# I TOTALS 3,946i 1c 3,946s 0e 3,946u read 3.0MiB output 0.3MiB 176.23RRU Avg 3,058.48WRU/s Delete 31,360.10WRU Total 10.3s {}

# Analyze the largest streams in the '$Permission' category
eqx top -S -cl '$Perm%' cosmos -d db -c $EQUINOX_COSMOS_CONTAINER
# I Page 254> 254i 254s 0e 254u 4.33>4.33<4.65MiB 349.76RU 3.9s D+M 8.2 C+C 0.00 105ms age 0013.23:34:02 {}
# I Page 1671>1671i 1671s 0e 1671u 2.39>2.40<2.54MiB 91.57RU 2.1s D+M 2.9 C+C 0.00 99ms age 0013.23:34:07 {}
# I TOTALS 1,925i 1,925c 1,925s 0e 1,925u read 0.0GiB output 0.0GiB JSON 0.0GiB D+M(inflated) 0.0GiB C+C 0.00MiB Parse 0.207s Total 441.33RU 9.4s {}
# I 1925i 7.19MiB E 0 0.0 U 1925 6.6 D+M 11.1 C+C 0.0 $Permission {}
# I 1i 1.75MiB E 0 0.0 U 1 1.8 D+M 3.1 C+C 0.0 $Permission-5292b7cd524d509bb969bd82abf39461 {}
# I 1i 1.38MiB E 0 0.0 U 1 1.4 D+M 2.5 C+C 0.0 $Permission-244b72fb0238595494b5cb3f9bd1abf7 {}
# I 1i 0.79MiB E 0 0.0 U 1 0.8 D+M 1.5 C+C 0.0 $Permission-68a13e8398b352c5b8e22ec18ab2bbb6 {}
# I 1i 0.57MiB E 0 0.0 U 1 0.6 D+M 1.1 C+C 0.0 $Permission-ea4d1f46014a5bf6bbd97d3ec5723266 {}
# I 1i 0.13MiB E 0 0.0 U 1 0.1 D+M 0.2 C+C 0.0 $Permission-65b58d132ff857bb81b08a5bb69732d2 {}
# I 1i 0.02MiB E 0 0.0 U 1 0.0 D+M 0.0 C+C 0.0 $Permission-a7bcc3370ad15ae68041745ca55166cf {}
# I 1i 0.02MiB E 0 0.0 U 1 0.0 D+M 0.0 C+C 0.0 $Permission-03032ccf597857d9aa9c64b10288af8c {}
```

6. Use `propulsion sync` tool to run a CosmosDB ChangeFeedProcessor
Expand Down
4 changes: 2 additions & 2 deletions samples/Infrastructure/Services.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ type Store(store) =
MemoryStore.MemoryStoreCategory(store, name, codec, fold, initial)
| Store.Config.Cosmos (store, caching, unfolds) ->
let accessStrategy = if unfolds then CosmosStore.AccessStrategy.Snapshot snapshot else CosmosStore.AccessStrategy.Unoptimized
CosmosStore.CosmosStoreCategory<'event,'state,_>(store, name, FsCodec.SystemTextJson.Encoding.EncodeTryCompressUtf8 codec, fold, initial, accessStrategy, caching)
CosmosStore.CosmosStoreCategory<'event,'state,_>(store, name, FsCodec.SystemTextJson.Encoder.CompressedUtf8 codec, fold, initial, accessStrategy, caching)
| Store.Config.Dynamo (store, caching, unfolds) ->
let accessStrategy = if unfolds then DynamoStore.AccessStrategy.Snapshot snapshot else DynamoStore.AccessStrategy.Unoptimized
DynamoStore.DynamoStoreCategory<'event,'state,_>(store, name, FsCodec.Compression.EncodeTryCompress codec, fold, initial, accessStrategy, caching)
DynamoStore.DynamoStoreCategory<'event,'state,_>(store, name, FsCodec.Encoder.Compressed codec, fold, initial, accessStrategy, caching)
| Store.Config.Es (context, caching, unfolds) ->
let accessStrategy = if unfolds then EventStoreDb.AccessStrategy.RollingSnapshots snapshot else EventStoreDb.AccessStrategy.Unoptimized
EventStoreDb.EventStoreCategory<'event,'state,_>(context, name, codec, fold, initial, accessStrategy, caching)
Expand Down
2 changes: 1 addition & 1 deletion samples/Store/Domain/Domain.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="FSharp.Core" Version="6.0.7" ExcludeAssets="contentfiles" />

<PackageReference Include="FsCodec.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.4-alpha.0.11" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.4-alpha.0.15" />

<ProjectReference Include="..\..\..\src\Equinox\Equinox.fsproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Store/Domain/Infrastructure.fs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module EventCodec =

/// For CosmosStore - we encode to JsonElement as that's what the store talks
let genJsonElement<'t when 't :> TypeShape.UnionContract.IUnionContract> =
FsCodec.SystemTextJson.CodecJsonElement.Create<'t>() |> FsCodec.SystemTextJson.Encoding.EncodeUncompressed
FsCodec.SystemTextJson.CodecJsonElement.Create<'t>() |> FsCodec.SystemTextJson.Encoder.Uncompressed

/// For stores other than CosmosStore, we encode to UTF-8 and have the store do the right thing
let gen<'t when 't :> TypeShape.UnionContract.IUnionContract> =
Expand Down
1 change: 1 addition & 0 deletions samples/Store/Integration/LogIntegration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module EquinoxCosmosInterop =
| Log.Metric.Query (Direction.Backward,c,m) -> "CosmosQueryB", m, Some c, m.ru
| Log.Metric.QueryResponse (Direction.Forward,m) -> "CosmosResponseF", m, None, m.ru
| Log.Metric.QueryResponse (Direction.Backward,m) -> "CosmosResponseB", m, None, m.ru
| Log.Metric.Index m -> "CosmosLinq", m, None, m.ru
| Log.Metric.SyncSuccess m -> "CosmosSync200", m, None, m.ru
| Log.Metric.SyncConflict m -> "CosmosSync409", m, None, m.ru
| Log.Metric.SyncResync m -> "CosmosSyncResync", m, None, m.ru
Expand Down
2 changes: 1 addition & 1 deletion samples/Tutorial/Favorites.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ let favesCa = fold favesCba removeBEffect
let _removeBAgainEffect = Decisions.remove "b" favesCa
//val _removeBAgainEffect : Event list = []

// related streams are termed a Category; Each client will have it's own Stream.
// related streams are termed a Category; Each client will have its own Stream.
let [<Literal>] private CategoryName = "Favorites"
let clientAFavoritesStreamId = FsCodec.StreamId.gen id "ClientA"

Expand Down
2 changes: 1 addition & 1 deletion samples/Tutorial/Infrastructure.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module EventCodec =

/// For CosmosStore - we encode to JsonElement as that's what the store talks
let genJsonElement<'t when 't :> TypeShape.UnionContract.IUnionContract> =
FsCodec.SystemTextJson.CodecJsonElement.Create<'t>() |> FsCodec.SystemTextJson.Encoding.EncodeUncompressed
FsCodec.SystemTextJson.CodecJsonElement.Create<'t>() |> FsCodec.SystemTextJson.Encoder.Uncompressed

/// For stores other than CosmosStore, we encode to UTF-8 and have the store do the right thing
let gen<'t when 't :> TypeShape.UnionContract.IUnionContract> =
Expand Down
Loading
Loading