Skip to content

Conversation

@mgentry612
Copy link

This PR proposes a fix for this issue: #2294.

The bug as defined in the above issue is summarized as: Creating a new application with a custom-read-model-connector results in the custom read model projection handler not being called. The event subscriber table keeps the current state of an event subscriber with the busy column. In the problematic case on app startup, an empty array of events are retrieved for the custom read model. This results in running code where the busy state is never updated to false. Since there is a check for busy before calling event handlers, the check always returns busy is true and the event handling is exited early.

The fix in this PR updates the event subscriber table and busy to false after an empty array of events is processed. Before this fix, execution ends in an empty if block with the comment TODO???. It's also possible the real problem is the event handler processing function custom-read-model.ts build function should never be called.

With this fix, custom read model projection handlers are called like normal.

@mgentry612 mgentry612 requested a review from resolve-bot as a code owner May 15, 2023 20:11
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