1.8.0
This release brings numerous fixes, updates to API and performance improvements.
Breaking Changes
-
Instead of
NodeId
,ShardSessionRecord
now usesWorkerId
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
implementCloseable
(as addition of #1402). -
BlackBoxContext
API has been extended to provide an instance ofClient
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 inheritTenantId
fromBlackBoxContext
, but would NOT inheritUserId
andZoneId
.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 thenewState
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 ofAbstractCommandHandler
orAbstractEventReactor
(see #1423).
Performance
- Improved Catch-up caching (see #1406 for details).