Skip to content

1.8.0

Compare
Choose a tag to compare
@yevhenii-nadtochii yevhenii-nadtochii released this 15 Dec 17:57
· 173 commits to 1.x-dev since this release
3727246

This release brings numerous fixes, updates to API and performance improvements.

Breaking Changes

  • Instead of NodeId, ShardSessionRecord now uses WorkerId to indicate who is currently processing which shard.

    Thus, all shard processing sessions should be completed before the migration.

    Please see #1433 for details.

API Changes

  • Made BlackBoxContext implement Closeable (as addition of #1402).

  • BlackBoxContext API has been extended to provide an instance of Client linked to the context under the test.

    It makes possible to use Client in tests, for example:

    BlackBoxContext context = BlackBoxContext.from(...);
    ClientRequest clientRequest = context.client().asGuest();
    
    assertThat(clientRequest.select(ProjectView.class).run())
            .hasSize(0);
    clientRequest.command(createProject()).postAndForget();
    assertThat(clientRequest.select(ProjectView.class).run())
            .hasSize(1);

    Please note, that provided Client would inherit TenantId from BlackBoxContext, but would NOT inherit UserId and ZoneId.

    Check #1407 for details.

  • Made API calls for the conditional settings of ServerEnvironment "lazy".

    Previously, ServerEnvironment provided two kinds of API calls for the conditional settings:

     ServerEnvironment.when(Staging.class)
                      // This call is handy when `myStorageFactory` is already available.
                      .use(myStorageFactory)
    
     ServerEnvironment.when(PreProduction.class)
                      // And this one looks lazy, so that it is only executed when and _if_ requested.
                      .use((env) -> createMySqlStorage())

    However, in fact, there was no "lazy" behavior, which caused numerous workarounds to actually postpone the initialization of environment-specific settings until they start to make sense.

    This release addresses the issue by making the behavior truly "lazy" (see #1421).

Fixes

  • Enabled IntegrationBroker dispatch events regardless of registration order of subscribing and publishing Bounded Contexts (see #1402).

  • Transformation of an Entity's state during Migration has been changed so that the newState completely overwrites the old one within the migration transaction (see #1405).

  • The internals of IntegrationBroker were made more thread-safe (see #1423).

  • SubscriptionService now properly locates the Bounded Context when subscribing to events produced by standalone producers, such as descendants of AbstractCommandHandler or AbstractEventReactor (see #1423).

Performance

  • Improved Catch-up caching (see #1406 for details).