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

[Experimental] introduce event id & fix split stream logic in stream store #657

Open
wants to merge 4 commits into
base: 3.6.x
Choose a base branch
from

Conversation

DavidBadura
Copy link
Member

This PR needs #656

Each event now gets a unique ID when saved in the StreamStore. You can either set this externally using EventIdHeader or it is generated automatically internally.

Using the event ID, I was also able to solve the problem with the split stream and missing playhead. I adapted the archiving logic so that I can simply archive all messages in a stream that happened before a certain event ID.

@DavidBadura DavidBadura added the enhancement New feature or request label Dec 13, 2024
@DavidBadura DavidBadura added this to the 3.6.0 milestone Dec 13, 2024
@DavidBadura DavidBadura force-pushed the event-id branch 2 times, most recently from 6fc81bd to 1f23240 Compare December 13, 2024 14:43
Copy link

github-actions bot commented Dec 13, 2024

Hello 👋

here is the most recent benchmark result:

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

+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                               | memory                                     |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>  | Tag: base       | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 3.079s (±0.00%) | 3.090s (±0.00%) | -0.35%    | 46.883mb        | 46.891mb   | -0.02%      |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBatchBench
============================

+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                                   | memory                                     |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>    | Tag: base         | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 75.995ms (±0.00%) | 72.749ms (±0.00%) | +4.46%    | 34.234mb        | 34.234mb   | 0.00%       |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+

SimpleSetupStreamStoreBench
===========================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 1.005ms (±0.00%)   | 879.500μs (±0.00%) | +14.29%   | 34.862mb        | 34.744mb   | +0.34%      |
| benchLoad10000Events ()                | 55.197ms (±0.00%)  | 48.093ms (±0.00%)  | +14.77%   | 34.862mb        | 34.744mb   | +0.34%      |
| benchSave1Event ()                     | 1.341ms (±0.00%)   | 1.246ms (±0.00%)   | +7.57%    | 34.862mb        | 34.744mb   | +0.34%      |
| benchSave10000Events ()                | 289.275ms (±0.00%) | 212.805ms (±0.00%) | +35.93%   | 34.862mb        | 34.744mb   | +0.34%      |
| benchSave10000Aggregates ()            | 10.643s (±0.00%)   | 9.371s (±0.00%)    | +13.57%   | 34.862mb        | 34.744mb   | +0.34%      |
| benchSave10000AggregatesTransaction () | 4.845s (±0.00%)    | 4.728s (±0.00%)    | +2.48%    | 34.862mb        | 34.745mb   | +0.34%      |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

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

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000EventsMissingSnapshot () | 49.361ms (±0.00%)  | 50.165ms (±0.00%)  | -1.60%    | 33.836mb        | 33.836mb   | 0.00%       |
| benchLoad10000Events ()                | 915.200μs (±0.00%) | 931.500μs (±0.00%) | -1.75%    | 33.836mb        | 33.836mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

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

+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                         | time (kde mode)                                     | memory                                     |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                 | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events () | 4.316ms (±0.00%)   | 4.425ms (±0.00%)   | -2.47%    | 37.072mb        | 37.072mb   | 0.00%       |
| benchSave10000Events () | 339.796ms (±0.00%) | 346.544ms (±0.00%) | -1.95%    | 37.144mb        | 37.144mb   | 0.00%       |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

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

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 886.100μs (±0.00%) | 892.800μs (±0.00%) | -0.75%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchLoad10000Events ()                | 83.802ms (±0.00%)  | 83.099ms (±0.00%)  | +0.85%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchSave1Event ()                     | 1.921ms (±0.00%)   | 1.889ms (±0.00%)   | +1.66%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchSave10000Events ()                | 240.155ms (±0.00%) | 244.122ms (±0.00%) | -1.63%    | 34.897mb        | 34.897mb   | 0.00%       |
| benchSave10000Aggregates ()            | 14.153s (±0.00%)   | 13.995s (±0.00%)   | +1.13%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 8.770s (±0.00%)    | 8.746s (±0.00%)    | +0.27%    | 35.396mb        | 35.396mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

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

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 898.400μs (±0.00%) | 925.800μs (±0.00%) | -2.96%    | 33.765mb        | 33.765mb   | 0.00%       |
| benchLoad10000Events ()                | 48.674ms (±0.00%)  | 48.644ms (±0.00%)  | +0.06%    | 33.765mb        | 33.765mb   | 0.00%       |
| benchSave1Event ()                     | 1.105ms (±0.00%)   | 1.592ms (±0.00%)   | -30.59%   | 33.765mb        | 33.765mb   | 0.00%       |
| benchSave10000Events ()                | 213.518ms (±0.00%) | 217.261ms (±0.00%) | -1.72%    | 33.765mb        | 33.765mb   | 0.00%       |
| benchSave10000Aggregates ()            | 8.704s (±0.00%)    | 10.175s (±0.00%)   | -14.45%   | 33.765mb        | 33.765mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 4.713s (±0.00%)    | 4.734s (±0.00%)    | -0.44%    | 33.765mb        | 33.765mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

This comment gets update everytime a new commit comes in!

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.

1 participant