JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.88k stars 458 forks source link

Wait for non stale results extension for LINQ #3489

Open jeremydmiller opened 1 month ago

jeremydmiller commented 1 month ago

I hated this about RavenDb years ago, but here we are.

For multi-stream projections, it's just not feasible to run them as Inline if there's any contention between threads. But other folks want to query the results of multi-stream projections with strong consistency.

As a workaround, how about an option to add a "wait for non stale results" waiter in LINQ specifically for multi-stream projections. This would "wait" until the multi-stream projection was seen to be caught up w/ the the high water mark at the initial request, then proceed

AlexZeitler commented 1 month ago

Since I have already entered the territory of multi-stream projections, I can imagine that I will (have to) use it sooner or later.