Skip to content

Releases: JasperFx/marten

6.4.0

22 Nov 10:27
Compare
Choose a tag to compare

🚀 What's New

  • Added Support to stream JSON in ASP.NET with raw SQL to HttpContext by @kwestground in #2783

✏️ What's Changed

  • Updated peer dependencies by minor version by @oskardudycz in #2788, #2790
  • Fixed conjoined tenancy handing in Custom Aggregation Projections. A follow-up to #2497, which missed custom aggregation projections in the initial changes set. by @haefele in #2764
  • Fixed event type handling order to be predictive in projection handling. There was an edge case causing code generation to generate event type handling order in a non-predictive manner. PR fixed sorting for pattern matching encapsulating logic in EventTypePatternMatchFrame by @svrx in #2760
  • Hidden visibility of the old aggregations type by applying EditorBrowsable attribute by @gfoidl in #2784

📄 Docs updates and CI

  • Update wording in Document Identity and the Introduction docs by @mjeaton in #2763, #2765
  • Renamed Custom Projection to Custom Aggregations in Event Sourcing docs menu by @gfoidl in #2774
  • Replaced (internal) Event<T> with IEvent<T> in docs by @gfoidl in #2776

New Contributors

Full Changelog: v6.3.0...v6.4.0
Milestone: https://github.com/JasperFx/marten/milestone/104?closed=1

6.3.0

23 Oct 20:14
Compare
Choose a tag to compare

🚀 What's New

  • Added optional metadata column to maintain created timestamp in documents. Previously, we had the last modified column deleted at, etc. Now you can also track when the document was created by @ribbal in #2741
  • Add stream key variants of batched event query operations. Now you can do batch event queries not only if you use Guids as your stream ids. by @elexisvenator in #2742
  • Add IEvent<TEvent> fanout overload on multistream projection. Now you can also define projections' FanOut rules to event with metadata. by @erdtsieck in #2748

✏️ What's Changed

📄 Docs updates and CI

  • Added initial documentation about integration testing by @erdtsieck in #2732
  • Adjusted information about the column mapping naming convention in Flat Table Projection documentation by @ogysha in #2755
  • Adjusted Async projection test with IoC injection to remove flakiness by @oskardudycz in #2756

New Contributors

Full Changelog: v6.2.0...v6.3.0
Milestone: https://github.com/JasperFx/marten/milestone/102?closed=1

6.2.0

13 Sep 15:18
Compare
Choose a tag to compare

🚀 What's New

  • Added a new facility to work with IoC services in projections. Closes… by @jeremydmiller in #2722

✏️ What's Changed

📄 Docs updates

New Contributors

Full Changelog: 6.1.0...v6.2.0

6.1.0

08 Sep 09:55
Compare
Choose a tag to compare

🚀 What's New

  • Added AsyncDaemonHealthCheck to track events handling lag in async projections. Marten now supports a customizable HealthChecks. This can be useful when running the async daemon in a containerized environment such as Kubernetes. The check will verify that no projection's progression lags more than maxEventLag behind the HighWaterMark. The default maxEventLag is 100. Read more in HealthChecks documentation by @daveHylde in #2679

✏️ What's Changed

  • Fixed Marten Exceptions transformations when NpgslCommand is null. Now you'll see all exception details again when connection to the database cannot be established because of wrong credentials, database unavailability, etc., by @oskardudycz in #2689, #2670
  • Set DeadLetterEvent as single tenanted for conjoined tenancy. Previously, it was following the global conventions around tenancy, which could be confusing. A dead letter event represents an event skipped for the particular projection. It references that event at a specific global event store sequence. Thus, it has to be global and does not have a tenant. If we rebuild the projection, all read models will be rebuilt using events from all tenants. Read more in the poison event detection docs. by @oskardudycz in #2690, #2686
  • Enhanced ProjectionUpdateBatch disposal. There could be a race condition when the session was released, but the processing Queue wasn't completed, which caused the session to be null. Added nullable annotations to make that explicit and fixes accordingly (by checking the cancellation token and implementing disposal consistently). by @oskardudycz in #2690, #2686
  • Fixed NGramIndex schema SQL diff generation. Now it won't be always dropped & recreated. by @mysticmind JasperFx/weasel#96, #2677
  • Updated Weasel to 6.1.0 and other dependencies by @oskardudycz in #2677, #2701
  • Added readonly modifier to fields that are never changed in various places throughout the codebase by @Lehonti in #2669

📄 Docs updates

See also related Weasel 6.1.0 release notes.

New Contributors

Full Changelog: 6.0.4...6.1.0

6.0.5

23 Jul 13:48
Compare
Choose a tag to compare

✏️ What's Changed

  • Fixes event types aliases resolution for not mapped explicitly event types. This ensures that you don't need to use AddEventTypes explicitly when rebuilding custom projections. by @Hawxy in #2647, #2650
  • Fixed querying for primitive types in custom SQL by @Hawxy in #2642
  • Fixed provider file code generation for LiveStreamAggregation. In release 6.0.3 we introduced the regression that disabled Provider files code generation. This could be an issue for people using pre-generated build files and static-type load mode. Now it's working correctly: generating code files, but not a redundant table. by @oskardudycz in #2654, #2645
  • Fixed calculating delta for Full-Text Index with multiple columns. Now it won't always be trying to recreate indexes on subsequent migrations run by @oskardudycz in #2656
  • Extended test coverage and documentation around automatically enabling extensions for tenants. Explained in more detail why Marten can't predict tenants if they're not set in configuration. Showed examples of dynamic tenant generation and applying migrations for database per tenant configuration. Read more in the documentation. by @T0shik and @oskardudycz in #2637
  • Added test for computed index on DateTime column migration by @oskardudycz in #2655

Full Changelog: 6.0.4...6.0.5
Milestone: https://github.com/JasperFx/marten/milestone/99

6.0.4

07 Jul 16:42
Compare
Choose a tag to compare

✏️ What's Changed

  • Enabled async projections to respect EnableDocumentTrackingByIdentity in regular mode, not only during the rebuild. It appeared that this setting worked for rebuilds but wasn't correctly handled in regular usage, which caused the document operations Load method not to check the pending changes and return null. Now it should be handled correctly in both modes. by @oskardudycz in #2634

Full Changelog: 6.0.3...6.0.4
Milestone: https://github.com/JasperFx/marten/milestone/98

6.0.3

04 Jul 09:45
Compare
Choose a tag to compare

✏️ What's Changed

  • Stopped passing Connection string information into MartenCommandException. Fixed by that security risk of exposing database credentials information by @jeremydmiller in #2616, #2614
  • Stopped creating redundant document tables for live stream aggregation. Live stream aggregation is made in-memory so no table is needed. It wasn't a serious issue, as it wasn't used, but it still could create confusion. Fixed by @jeremydmiller in #2616, #2610
  • Fixed deadlock while rebuilding projections when there are zero events. by @jeremydmiller in #2616, #2519
  • Rebuilding a projection now ensures that event storage exists. by @jeremydmiller in #2620, #2567
  • Added warnings in docs around Transactions handling. Marten is unable to evaluate database migrations within a session that is created by enrolling in an ambient transaction (TransactionScope). If you need to use ambient transactions, you will need to apply database changes upfront. by @jeremydmiller in #2620, #1452, #2564
  • Fixed Projections command line failure when by using a GUID as a constructor parameter for T in SingleStreamProjection. Projection code generation will ignore single argument constructor that takes primitive type by @jeremydmiller in #2617, #2607
  • Add Dictionary ContainsKey support for value types Now you can use it in the Linq queries, e.g. session.Query<Document>().Where(t => t.GuidDict.ContainsKey(guid)) by @Hawxy in #2626
  • Support upcasters within async projections. Async Daemon filter didn't include the proper filter for event type name aliases by @Hawxy in #2625
  • Upgraded Weasel and Oakton to 6.0.1 by @jeremydmiller in #2616

Full Changelog: 6.0.2...6.0.3
Milestone: https://github.com/JasperFx/marten/milestone/97?closed=1

6.0.2

23 Jun 12:23
Compare
Choose a tag to compare

✏️ What's Changed

  • Fixed broken queries on properties with empty JSON.NET [JsonProperty] attributes by @elexisvenator in #2601
  • Fixed LINQ queries with SELECT to return data when using JSON casing by @oskardudycz in #2612
  • *Fixed handling of similarly named nested where clauses. When parsing expressions, marten will cache expression paths for future reuse. Unfortunately, the caching key was not specific enough. PR ensured that proper nesting is applied when caching. by @elexisvenator in #2603
  • Fixed runtime error when parsing a query with Include() in a multitenant database by @elexisvenator in #2602

Full Changelog: 6.0.1...6.0.2
Milestone: https://github.com/JasperFx/marten/milestone/95?closed=1

6.0.1

23 May 21:34
Compare
Choose a tag to compare

✏️ What's Changed

Async Projections

  • Ensured that the hot-cold coordinator exits if host cancellation occurred. That should help in the thread-intensive work, e.g. in the parallel test pipelines by @Hawxy in #2581
  • Made EnableDocumentTrackingByIdentity async projection option to support custom IProjections. It appeared that it was only working for the built-in projections, we enhance that to enable using it also for custom projections by @oskardudycz in #2598

Docs

  • Fixed broken markdown link in Schema Feature Extensions docs by @schnerring in #2584
  • Added hint on how to use generic IConfigureMarten for multitentant database by @AlexZeitler in #2585
  • Reworked introduction & getting started guidance to make it look 21st centurish by @Hawxy in #2589

New Contributors

Full Changelog: 6.0.0...6.0.1
Milestone: https://github.com/JasperFx/marten/milestone/94?closed=1

6.0.0

03 May 14:28
Compare
Choose a tag to compare

📢 What's Breaking

  • Dropped support of .NET Core 3.1 and .NET 5 following the Official .NET Support Policy. That allowed us to benefit fully from recent .NET improvements around asynchronous code, performance etc. Plus made maintenance easier by removing branches of code. by @oskardudycz, @mohsin-mehmood in #2394, JasperFx/weasel#73, #2549

  • Upgraded Npgsql version to 7. We didn't face substantial issues this time, but see the Npgsql 7 release notes for detailed information about breaking changes. by @oskardudycz in #2394, JasperFx/weasel#73

  • Generic OpenSession store options (OpenSession(SessionOptions options) does not track changes by default. Previously, it was using identity map. Other overloads of OpenSession didn't change the default behaviour but were made obsolete. We encourage using explicit session creation and LightweightSession by default, as in the next major version, we plan to do the full switch. By @jeremydmiller.

  • Renamed asynchronous session creation to include explicit Serializable name. OpenSessionAsync was misleading, as the intention behind it was to enable proper handling of Postgres' serialized transaction level. Renamed the method to OpenSerializableSessionAsync and added explicit methods for session types. By @oskardudycz in #2514

  • Removed default projection lifecycle. We had different projection lifecycles that could depend on the projection type. That was confusing enough, and it could create nasty production issues in the case of missing that fact. We decided to make it explicit. By @oskardudycz in #2540

  • Removed obsolete methods marked as to be removed in the previous versions.:

    • Removed synchronousBuildProjectionDaemon from the IDocumentStore method. Use the asynchronous version instead.
    • Removed Schema from IDocumentStore. Use Storage instead.
    • Replaced GroupEventRange in IAggregationRuntime with Slicer reference.
    • Removed unused UseAppendEventForUpdateLock setting.
    • Removed the Searchable method from MartenRegistry. Use Index instead.

    By @mysticmind in #2538

  • ASP.NET JSON streaming WriteById is now using correctly custom onFoundStatus. We had the bug and always used the default status. It was fixed in #2407. So it's enhancement but also technically a breaking change to the behaviour. We also added onFoundStatus to other methods, so you could specify, e.g. 201 Created status for creating a new record. By @gfoidl in #2407

  • Added Optimistic concurrency checks during documents' updates. Previously, they were only handled when calling the Store method; now Update uses the same logic. by @luboshl in #2478

  • Base state passed as parameter is returned from AggregateStreamAsync instead of null when the stream is empty. AggregateStreamAsync allows passing the default state on which we're applying events. When no events were found, we were always returning null. Now we'll return the passed value. It is helpful when you filter events from a certain version or timestamp. It'll also be useful in the future for archiving scenarios. By @oskardudycz in #2543, #2541

  • Ensured events with both Create and Apply in stream aggregation were handled only once. When you defined both Create and Apply methods for the specific event, both methods were called for the single event. That wasn't expected behaviour. Now they'll be only handled once. By @elexisvenator in #2559

  • Added missing passing Cancellation Tokens in all async methods in public API. That ensures that cancellation is handled correctly across the whole codebase. Added the static analysis to ensure we won't miss them in the future. By @oskardudycz in #2488

  • All the Critter Stack dependencies like Weasel, Lamar, JasperFx.Core, Oakton, and JasperFx.CodeGeneration were bumped to the latest major versions. By @jeremydmiller and @oskardudycz #2394, #2417, #2419, #2485, #2512, #2526, #2536, #2572

🚀 What's New

Dependencies

  • Added official support for .NET 7 with the latest versions of System.Text.Json and Npgsql, etc. by @oskardudycz in #2394

Documents

  • Added possibility to specify that document can be single tenanted (SingleTenanted option) when the global convention is to have multi-tenanted. By @oskardudycz in #2497
  • Added Optimistic concurrency checks during documents' updates. Previously, they were only handled when calling the Store method; now Update uses the same logic. by @luboshl and @jeremydmiller in #2478, #2439, #2501, #2526

Linq

  • Added dynamic OrderBy extensions for batched queries. Now you can order by multiple properties and chain the ordering together with a sort order. Added possibility to specify select statements in batch query order by (e.g. select random()). By @smbecker in #2356, #2362
  • Json serializer attributes STJ JsonPropertyName and Newtonsoft JsonProperty are now respected in Linq queries. Now, when you change the property name but use the old name thanks to the serializer attribute, Linq queries will use the name from the attribute. By @jeremydmiller in #2513, #2507

Connection Management

  • Added explicit LightweightSession and IdentitySession creation methods to DocumentStore. Previously you could create DirtyTrackedSession explicitly. Now you can create all types of sessions explicitly. We recommend using them explicitly instead of the generic OpenSession method. By @oskardudycz in #2463

ASP.NET

Projections

  • Base state passed as parameter is returned from AggregateStreamAsync instead of null when the stream is empty. AggregateStreamAsync allows passing the default state on which we're applying events. When no events when found, we were always returning null. Now we'll return the passed value. It is helpful when you filter events from a certain version or timestamp. It'll also be useful in the future for archiving scenarios. By @oskardudycz in #2543, #2541
  • Add missing ProjectAsync aggregate overload for immutable read models Now you can use records in projections that do .NET async stuff. By @Hawxy in #2520

Async Projections

Schema Management

  • Added automatic retries when schema updates are running in parallel. Marten locks the schema update using advisory locks. Previously when acquiring lock failed, then schema update also failed. Now it will be retried, which enables easier parallel automated tests and running schema migration during the startup for the containerized environment. By @oskardudycz in #2479
  • **Made possible...
Read more