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

Filter out unresolved events when checking for deleted partitions #2586

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

hayley-jean
Copy link
Member

Changed: Don't treat unresolved links as deleted linkTo events when checking for deleted partitions in projections.

Fixes #2532

If multiple deleted events for the same stream are written quickly, it's possible for the projection to process a deleted link event that couldn't be resolved. This can result in the projection processing the event twice, once as a committed event and once as a partition deleted event. See the issue for details on how/why this happens.

This PR changes the check for whether to publish an EventReaderPartitionDeleted message to also check if the link is resolved.
Because the partition deleted messages don't get emitted this change should be backwards compatible.

@hayley-jean hayley-jean added subsystem/projections Issues relating to the projections framework backport labels Jul 6, 2020
@hayley-jean hayley-jean self-assigned this Jul 6, 2020
Copy link
Member

@shaan1337 shaan1337 left a comment

Choose a reason for hiding this comment

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

Tested with the reproduction steps and the issue does not occur after the fix

@shaan1337 shaan1337 merged commit d54e033 into master Jul 8, 2020
@shaan1337 shaan1337 deleted the projections-partition-deleted branch July 8, 2020 10:41
hayley-jean pushed a commit that referenced this pull request Jul 8, 2020
Filter out unresolved events when checking for deleted partitions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport subsystem/projections Issues relating to the projections framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event at checkpoint tag $ce-<stream>: <event> has been already processed
3 participants