Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw on duplicate name in aggregate and event registry #611

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

DanielBadura
Copy link
Member

@DanielBadura DanielBadura commented Jun 25, 2024

This will prevent configuration errors. Right now, we just take the last found Aggregate but imho we should throw since the name must be unique and this can not be the desired behaviour for our users.

@DanielBadura DanielBadura requested a review from DavidBadura June 25, 2024 18:46
@DanielBadura DanielBadura self-assigned this Jun 25, 2024
@DanielBadura DanielBadura added the enhancement New feature or request label Jun 25, 2024
@DanielBadura DanielBadura force-pushed the throw-if-aggregate-name-duplicate-in-registry branch from f6a67df to e50319a Compare June 25, 2024 18:49
…and throw if it is so

Check if aggregateName is already in result set for the registry map and throw if it is so
@DanielBadura DanielBadura force-pushed the throw-if-aggregate-name-duplicate-in-registry branch from e50319a to 892421b Compare June 25, 2024 18:50
Copy link

github-actions bot commented Jun 25, 2024

Hello 👋

here is the most recent benchmark result:

PersonalDataBench
=================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 845.200μs (±0.00%) | 896.000μs (±0.00%) | -5.67%    | 35.395mb        | 35.403mb   | -0.02%      |
| benchLoad10000Events ()                | 83.660ms (±0.00%)  | 84.524ms (±0.00%)  | -1.02%    | 34.893mb        | 35.403mb   | -1.44%      |
| benchSave1Event ()                     | 1.284ms (±0.00%)   | 1.241ms (±0.00%)   | +3.49%    | 34.893mb        | 34.893mb   | 0.00%       |
| benchSave10000Events ()                | 239.076ms (±0.00%) | 246.178ms (±0.00%) | -2.88%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchSave10000Aggregates ()            | 10.477s (±0.00%)   | 10.810s (±0.00%)   | -3.08%    | 34.893mb        | 34.893mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 8.708s (±0.00%)    | 8.675s (±0.00%)    | +0.38%    | 35.394mb        | 35.394mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBench
=======================

+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                               | memory                                     |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>  | Tag: base       | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 3.031s (±0.00%) | 3.036s (±0.00%) | -0.18%    | 34.162mb        | 34.162mb   | 0.00%       |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+

SplitStreamBench
================

+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                         | time (kde mode)                                     | memory                                     |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                 | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events () | 4.674ms (±0.00%)   | 4.591ms (±0.00%)   | +1.79%    | 37.070mb        | 37.070mb   | 0.00%       |
| benchSave10000Events () | 335.938ms (±0.00%) | 340.330ms (±0.00%) | -1.29%    | 37.072mb        | 37.073mb   | -0.00%      |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SimpleSetupBench
================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 942.700μs (±0.00%) | 933.300μs (±0.00%) | +1.01%    | 33.763mb        | 33.763mb   | 0.00%       |
| benchLoad10000Events ()                | 50.321ms (±0.00%)  | 50.033ms (±0.00%)  | +0.58%    | 33.763mb        | 33.763mb   | 0.00%       |
| benchSave1Event ()                     | 870.900μs (±0.00%) | 838.100μs (±0.00%) | +3.91%    | 33.763mb        | 33.763mb   | 0.00%       |
| benchSave10000Events ()                | 213.310ms (±0.00%) | 214.052ms (±0.00%) | -0.35%    | 33.763mb        | 33.763mb   | 0.00%       |
| benchSave10000Aggregates ()            | 6.458s (±0.00%)    | 6.421s (±0.00%)    | +0.57%    | 33.763mb        | 33.763mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 4.685s (±0.00%)    | 4.655s (±0.00%)    | +0.64%    | 33.763mb        | 33.763mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SnapshotsBench
==============

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000EventsMissingSnapshot () | 50.948ms (±0.00%)  | 50.458ms (±0.00%)  | +0.97%    | 33.764mb        | 33.764mb   | 0.00%       |
| benchLoad10000Events ()                | 893.100μs (±0.00%) | 896.000μs (±0.00%) | -0.32%    | 33.764mb        | 33.764mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

This comment gets update everytime a new commit comes in!

@DanielBadura DanielBadura changed the title Throw on duplicate name in aggregate registry Throw on duplicate name in aggregate and event registry Jul 3, 2024
@DanielBadura DanielBadura marked this pull request as ready for review July 3, 2024 11:33
@DanielBadura DanielBadura force-pushed the throw-if-aggregate-name-duplicate-in-registry branch from f37de16 to 0d54e10 Compare July 3, 2024 11:51
@DanielBadura DanielBadura merged commit ea4ee7a into 3.1.x Jul 3, 2024
37 checks passed
@DanielBadura DanielBadura deleted the throw-if-aggregate-name-duplicate-in-registry branch July 3, 2024 11:52
@DanielBadura DanielBadura added this to the 3.1.0 milestone Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants