Skip to content

FRW-11561 duplications and deadlock fix#98

Merged
gechetspr merged 3 commits intomasterfrom
frw-11561-duplications-and-dead-lock-fix
Feb 23, 2026
Merged

FRW-11561 duplications and deadlock fix#98
gechetspr merged 3 commits intomasterfrom
frw-11561-duplications-and-dead-lock-fix

Conversation

@Nidhognit
Copy link
Contributor

PR Description

Add a meaningful description here that will let us know what you want to fix with this PR or what functionality you want to add.

Steps before you submit a PR

  • Please add tests for the code you add if it's possible.
  • Please check out our contribution guide: https://docs.spryker.com/docs/dg/dev/code-contribution-guide.html
  • Add a contribution-license-agreement.txt file with the following content:
    I hereby agree to Spryker\'s Contribution License Agreement in https://github.com/spryker/event-behavior/blob/HASH_OF_COMMIT_YOU_ARE_BASING_YOUR_BRANCH_FROM_MASTER_BRANCH/CONTRIBUTING.md.

This is a mandatory step to make sure you are aware of the license agreement and agree to it. HASH_OF_COMMIT_YOU_ARE_BASING_YOUR_BRANCH_FROM_MASTER_BRANCH is a hash of the commit you are basing your branch from the master branch. You can take it from commits list of master branch before you submit a PR.

Checklist

  • I agree with the Code Contribution License Agreement in CONTRIBUTING.md

@Nidhognit Nidhognit self-assigned this Feb 6, 2026
@snyk-spryker
Copy link
Collaborator

snyk-spryker commented Feb 6, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Contributor

@stereomon stereomon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are on it, can you check if PHPUnit update in this package?


do {
$events = $this->getEventEntitiesByProcessId($processId, $offset, $limit);
static::$eventBehaviorTableExists = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this what a bit worries me. We set this property to true at some point. In the new implementation I can't see that. TBH I don't remember why we did this way, but this changes might break existing behaviour

$this->triggerEventsAndDelete($events);
} while ($currentCountEvents === $limit);

if ($countEvents === $triggeredEvents && $triggeredEvents > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is here for some events that were not processed for some reason and we need to keep them in DB so the console command can pick the up later

$primaryKeys = array_merge($primaryKeys, $this->getPrimaryKeys($events));
$offset += $limit;
$this->triggerEventsAndDelete($events);
} while ($currentCountEvents === $limit);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing limit adding offset pulling makes this loop not needed. But do we really need to remove the limit? It might be there to not process a lot of events at once.
And this is also makes the config value obsolete and this sounds a bit BC breaky to me

@gechetspr gechetspr merged commit a1048da into master Feb 23, 2026
6 checks passed
@gechetspr gechetspr deleted the frw-11561-duplications-and-dead-lock-fix branch February 23, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants