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

[Fix] Better handling of projection Faulted status #28

Merged
merged 5 commits into from
Jun 26, 2022

Conversation

dev-rowbot
Copy link
Contributor

Based on some real world results, just checking for Faulted is not good enough then because the UI will show a projection as Faulted (enabled) which is actually some combination of strings.

The eventstore docs do allude to this but it does not appear to show all possible states
https://developers.eventstore.com/clients/grpc/projections.html#projection-details

This change will check if the Status field contains the Faulted sub-string. This prevents us getting in to a state where a projection is neither Started, Stopped, or Faulted. That is still possible, but missing a Faulted stated is critical and missing Initial is not.

@marcinbudny
Copy link
Owner

Hi @dev-rowbot, I will look at this PR soon. Is there any way to trigger the Faulted state for projection so that I can do some testing?

@marcinbudny marcinbudny merged commit 88642f3 into marcinbudny:master Jun 26, 2022
@marcinbudny
Copy link
Owner

I was able a way to make the projection go into faulted state and this change seems to work for both faulted-enabled and faulted stopped projections, although ESDB is far from consistent in naming these statuses. This is now released in v0.13.1

@dev-rowbot
Copy link
Contributor Author

Thank you for merging this @marcinbudny - sorry I took so long to respond.

To test I just created a bad projection (invalid syntax). In our environment the error occurred because the projection timed out, it took longer than 250ms to process. Maybe that could be simulated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants