You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It happens that if any of the event upgraders throw an exception will get stuck ReadModelPopulator in a while loop waiting for more events to be enqueued to _pipedEvents.
When an exception occurs it will fail on ReadModelPopulator:144, meanwhile a ReadModelPopulator:173 while loop will run for an eternity.
What's worse I was not seeing any errors in the Logging, so it took me a while to figure it out (maybe my logging levels are wrong)
I assume that event upgraders should never ever throw any exceptions (it should just skip the event and log an error, right?)
Suggestions for a fix:
Make sure it catches and logs exceptions
Make sure ProcessEventQueue won't run infinitely
The text was updated successfully, but these errors were encountered:
baltuonis
changed the title
PopulateAsync gets stuck in while loop if any of the event upgraders throw
PopulateAsync gets stuck in while loop if any of the event upgraders throw an exception
Feb 20, 2025
Here is the code that I'm using to run
IReadModelPopulator
It happens that if any of the event upgraders throw an exception will get stuck ReadModelPopulator in a while loop waiting for more events to be enqueued to
_pipedEvents
.When an exception occurs it will fail on ReadModelPopulator:144, meanwhile a ReadModelPopulator:173 while loop will run for an eternity.
What's worse I was not seeing any errors in the Logging, so it took me a while to figure it out (maybe my logging levels are wrong)
I assume that event upgraders should never ever throw any exceptions (it should just skip the event and log an error, right?)
Suggestions for a fix:
The text was updated successfully, but these errors were encountered: