Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
08d58eb
Typos/formatting
bartelink Aug 1, 2024
a22e0d6
feat(CosmosStore.Linq): Indexed Queries
bartelink Mar 28, 2024
26969f6
CL
bartelink Mar 28, 2024
6d4e70e
Dependency tweaks
bartelink Mar 28, 2024
5fb42df
Tweak example queries
bartelink Mar 28, 2024
c6d072c
4.1.0-alpha.1
bartelink Mar 28, 2024
96d048f
Add missing Disposal
bartelink Mar 29, 2024
e4a1afa
Polish
bartelink Mar 30, 2024
db09e58
Simplify
bartelink Mar 30, 2024
162aef4
Comments
bartelink Mar 30, 2024
69c6d8f
Tweaks
bartelink Mar 31, 2024
dd4bd24
Move extensions back to type
bartelink Mar 31, 2024
2ee3d49
Predicate finessing, log fixes
bartelink Apr 4, 2024
6b24083
RU Format tweak
bartelink Apr 4, 2024
ad57024
Add OrderByLambda; Explicate OrderByPropertyName
bartelink Apr 5, 2024
e0a2ca5
Add metrics wiring
bartelink Apr 8, 2024
41c10fe
Release 4.1.0-alpha.6
bartelink Apr 8, 2024
3f4d95a
fix log arg
bartelink Apr 9, 2024
5566fbd
Add queryLogLevel 4.1.0-alpha.7
bartelink Apr 22, 2024
f56ce4c
Format latency as n0 per rest of system
bartelink Apr 23, 2024
c1434f2
Release 4.1.0-alpha.9
bartelink May 8, 2024
1ea1d95
Tidy
bartelink May 24, 2024
cd0ab40
Consolidate log/enum
bartelink Jun 4, 2024
6f139d1
Tidy
bartelink Jun 4, 2024
378739c
Log polish
bartelink Jun 4, 2024
7f571bf
feat: eqx top
bartelink Jun 5, 2024
23b6ddd
Sorting, C+C, D+M, unsorted
bartelink Jun 7, 2024
5f9a019
Tidy
bartelink Jun 7, 2024
44b5fb5
CL
bartelink Jun 8, 2024
b38ac46
Destroy skeleton
bartelink Jun 12, 2024
faf8c26
Implement deletion
bartelink Jun 12, 2024
e3ddd86
Polish
bartelink Jun 12, 2024
a6e10c7
Add Custom SQL mode
bartelink Jun 13, 2024
4c25546
Ignore other people helping
bartelink Jun 14, 2024
dfa1607
Parallelize deletion
bartelink Jun 28, 2024
8145570
CL/tidy
bartelink Jun 28, 2024
3ff2498
Extend readme
bartelink Jun 28, 2024
2eaa04b
fix category counting
bartelink Jul 2, 2024
8d0bf16
Add Stream Count
bartelink Jul 3, 2024
4be4f92
Default 9999
bartelink Jul 3, 2024
2e60751
Tidy
bartelink Jul 3, 2024
915ddee
Move Streams first
bartelink Jul 3, 2024
4935940
Tidy
bartelink Jul 3, 2024
49c9b53
fix Limits logic
bartelink Jul 18, 2024
3a27979
Release 4.1.0-alpha.14
bartelink Jul 3, 2024
b605805
Count unfolds/unfolded
bartelink Jul 23, 2024
f7d8ed5
fix(Stats)!: Count Resync as read
bartelink Jul 23, 2024
ad92e3c
fix(stats): Relabel Documents -> Items
bartelink Jul 23, 2024
ee5b39e
fix(eqx stats): Handle newest/oldest when empty
bartelink Jul 31, 2024
4571e2c
Silence Page log in -Q mode
bartelink Aug 2, 2024
ee628d2
Add -sl; Polish -Q dump
bartelink Aug 14, 2024
254dd86
Cover TryLoad/TryHydrateTip logic
bartelink Jan 1, 2025
2f163cc
Release 4.1.0-alpha.18
bartelink Jan 3, 2025
715612c
Target FsCodec a14
bartelink Jan 4, 2025
41f13ee
4.1.0-alpha.22 Fix param binding
bartelink Jan 30, 2025
07b5af4
feat(eqx): Add top, cleanup flags
bartelink Feb 2, 2025
efb752d
Tidy
bartelink Feb 2, 2025
fc464cb
Merge branch 'master' into cosmos-linq
bartelink Feb 3, 2025
9572423
Merge branch 'master' into cosmos-linq
bartelink Feb 3, 2025
cd1c464
CL
bartelink Feb 3, 2025
5629e0f
Reorg
bartelink Feb 7, 2025
842a121
Release preview.3
bartelink Feb 7, 2025
5653edd
Fix comment
bartelink Feb 7, 2025
aaebd3a
Fix formatting
bartelink May 2, 2025
c6ecaa4
Polish
bartelink Jun 5, 2025
16b2b75
More polish
bartelink Jun 5, 2025
a911fe9
Nest
bartelink Jun 5, 2025
0bc4911
Merge remote-tracking branch 'origin/master' into cosmos-linq
bartelink Sep 24, 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
8 changes: 8 additions & 0 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

- `Equinox.CosmosStore.Linq`: Add LINQ querying support for Indexed `u`nfolds [#450](https://github.com/jet/equinox/pull/450)

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

<a name="4.1.0"></a>
## [4.1.0] - 2025-06-12

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
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ type LogSink(customTags: seq<string * string>) =
| Op (Operation.Tip304, m) -> observeTip ("R", "query", "tip", "ok", "304") m
| Op (Operation.Query, m) -> observe ("R", "query", "query", "ok") m
| QueryRes (_direction, m) -> observeRes ("R", "query", "queryPage") m
| Op (Operation.Index, m) -> observe ("R", "linq", "query", "ok") m
| Op (Operation.Write, m) -> observe ("W", "transact", "sync", "ok") m
| Op (Operation.Conflict, m) -> observe ("W", "transact", "conflict", "conflict") m
| Op (Operation.Resync, m) -> observe ("W", "transact", "resync", "conflict") m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Equinox.CosmosStore\Equinox.CosmosStore.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Equinox.CosmosStore" Version="[4.0.0, 5.0.0)" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Equinox.CosmosStore\Equinox.CosmosStore.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Equinox.CosmosStore" Version="[4.2.0, 5.0.0)" />-->
<!-- For now, use a `>=` as a hack. The minute we publish CosmosStore 4.2.0, change back to the normal scheme as above -->
<ProjectReference Include="..\Equinox.CosmosStore\Equinox.CosmosStore.fsproj" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 9 additions & 2 deletions src/Equinox.CosmosStore/CosmosStore.fs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ module Log =
| Delete of Measurement
/// Trimmed the Tip
| Trim of Measurement
/// Queried via the Index; count=-1 -> aggregate operation
| Index of Measurement
let [<return: Struct>] (|MetricEvent|_|) (logEvent: Serilog.Events.LogEvent): Metric voption =
let mutable p = Unchecked.defaultof<_>
logEvent.Properties.TryGetValue(PropertyTag, &p) |> ignore
Expand Down Expand Up @@ -265,7 +267,7 @@ module Log =
let internal eventLen (x: #IEventData<EncodedBody>) = EncodedBody.jsonUtf8Bytes x.Data + EncodedBody.jsonUtf8Bytes x.Meta + 80
let internal batchLen = Seq.sumBy eventLen
[<RequireQualifiedAccess>]
type Operation = Tip | Tip404 | Tip304 | Query | Write | Resync | Conflict | Prune | Delete | Trim
type Operation = Tip | Tip404 | Tip304 | Query | Index | Write | Resync | Conflict | Prune | Delete | Trim
let (|Op|QueryRes|PruneRes|) = function
| Metric.Tip s -> Op (Operation.Tip, s)
| Metric.TipNotFound s -> Op (Operation.Tip404, s)
Expand All @@ -274,6 +276,8 @@ module Log =
| Metric.Query (_, _, s) -> Op (Operation.Query, s)
| Metric.QueryResponse (direction, s) -> QueryRes (direction, s)

| Metric.Index s -> Op (Operation.Index, s)

| Metric.SyncSuccess s -> Op (Operation.Write, s)
| Metric.SyncResync s -> Op (Operation.Resync, s)
| Metric.SyncConflict s -> Op (Operation.Conflict, s)
Expand Down Expand Up @@ -308,6 +312,7 @@ module Log =
let epoch = System.Diagnostics.Stopwatch.StartNew()
member val internal Tip = Counters() with get, set
member val internal Read = Counters() with get, set
member val internal Index = Counters() with get, set
member val internal Write = Counters() with get, set
member val internal Resync = Counters() with get, set
member val internal Conflict = Counters() with get, set
Expand Down Expand Up @@ -335,6 +340,7 @@ module Log =
epoch.Tip.Ingest m
| Op (Operation.Query, BucketMsRu m) -> epoch.Read.Ingest m
| QueryRes (_direction, _) -> ()
| Op (Operation.Index, BucketMsRu m) -> epoch.Index.Ingest m
| Op (Operation.Write, BucketMsRu m) -> epoch.Write.Ingest m
| Op (Operation.Conflict, BucketMsRu m) -> epoch.Conflict.Ingest m
| Op (Operation.Resync, BucketMsRu m) -> epoch.Resync.Ingest m
Expand All @@ -351,13 +357,14 @@ module Log =
let stats =
[|nameof res.Tip, res.Tip
nameof res.Read, res.Read
nameof res.Index, res.Index
nameof res.Write, res.Write
nameof res.Resync, res.Resync
nameof res.Conflict, res.Conflict
nameof res.Prune, res.Prune
nameof res.Delete, res.Delete
nameof res.Trim, res.Trim |]
let isRead = function nameof res.Tip | nameof res.Read | nameof res.Prune -> true | _ -> false
let isRead = function nameof res.Tip | nameof res.Read | nameof res.Index | nameof res.Prune | nameof res.Resync -> true | _ -> false
let buckets = stats |> Seq.collect (fun (_n, stat) -> stat.Buckets) |> Seq.distinct |> Seq.sort |> Seq.toArray
if Array.isEmpty buckets then () else

Expand Down
Loading
Loading