-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat(medusa): Bulk emit events #3407
Conversation
🦋 Changeset detectedLatest commit: 761745e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this! Would be great to add some tests to the PR :)
39a9efd
to
12fc2aa
Compare
4636f89
to
75a84c5
Compare
75a84c5
to
8752603
Compare
1c80382
to
4eb96b7
Compare
4eb96b7
to
3401e4a
Compare
@adrien2p Will you investigate the failing check? 🙏 |
Sure 👌 |
Got it - that was what we were dreading. We are testing against a SQLite DB in the pipeline as well, so that's why it's failing. |
It seams that it should be available in sqlite from v3.35 https://www.sqlite.org/lang_returning.html i wonder which version are we using |
@olivermrbl I have opened an issue here in the mean time I ll do a fix |
… into feat/event-bus-bulk-emit commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth spending some time looking into how/if we could use the addBulk
in the enqueuer
as well? Otherwise, most emit
calls will not benefit from these optimizations, as they are part of a transaction i.e. the staged job flow.
Yes I will do that it is a very good point, though, the ones in the transaction benefit from the bulk insert of the staged jobs |
@olivermrbl I have updated the enqueuer, let me know wdyt |
Merge as you please. Afterward (or now), I'll publish a canary, and we can run tests in a multi-process env before we release. Okay? |
/snapshot-this |
🚀 A snapshot release has been made for this PRTest the snapshots by updating your yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add [email protected]
|
What
I can see during the perf tests that inserting lots of events create a bottleneck which is resolve by the bulk emit. During the refactoring we happen a lot to have the ability to bulk emit instead of having to emit them one by one. The perf are improved a lot
FIXES CORE-1220