What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
I am wondering, what was going on in the developers head when he wrote this:
I am wondering, what was going on in the developers head when he wrote this:
https://github.com/spryker/product-page-search/blob/master/src/Spryker/Zed/ProductPageSearch/Business/Model/ProductPageSearchWriter.php#L66-L85
I guess it sounds something like this - hmm, there is a possibility of race conditions when same event message gets in two or more parallel processing batches. Ok, let's handle this case, but you know what - let's log it as a critical error, because we already handled it.
Brilliant!
Comments
-
Spryker comes with an auto-healing mechanism on race condition situations, (event-retry queues), the
try/catch
part must be cleaned up as there is no need to save an entity again in the failing scenario0 -
Still, even after X retries, this can happen, especially on high load systems. Just saying...
0 -
Having a race conditions means that we are processing duplicate events in two or more different threads, which is the root cause of this race condition so we need to avoid trigger duplicate events as the last event is valid
0 -
Yes, you are right. But the main consequences are that 1-by-1 processing flow is triggered after this happens, thus performance suffers dramatically.
0 -
As well, you can't avoid duplicate event triggering, if entry-points for these event triggers are different flows.
0 -
Especially related to page search events, as there are many entry-points for that stuff.
0 -
Potential improvement would be not listen on product abstract event for page search, but introduce its own.
0 -
This is flexible during data-import, projects can triggers their own events and subscribe it with core listeners
0 -
At this point, we don't need spryker then. Thanks for your input.
0 -
Sure, your welcome! you can always decide when and where use project or core events. Spryker gives this flexibility to developers to decide on their implementation.
0 -
This is flexible during data-import
FYI - this is not only during data import. Even if clicking through zed UI multiple users at once, same behavior can happen.
0 -
At this point, we donβt need spryker then.
Spryker allows project to change the configuration to satisfy their needs, e.g ModuleConfig, DependencyProvider, Subscribers, etc.
FYI - this is not only during data import. Even if clicking through zed UI multiple users at once, same behavior can happen.Β (edited)
In our new improvements for P&S which have been released, now projects can also adjust the different core events with different listeners in new plugins and replace them in the configuration in projects:
https://github.com/spryker-shop/suite/blob/master/src/Pyz/Zed/Publisher/PublisherDependencyProvider.phpWe will release the documentations for this update as soon as they are ready π
Let men know if you still have questions
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 77 Spryker News
- 931 Developer Corner
- 789 Spryker Development
- 90 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random