NEventStore / NEventStore.Persistence.MongoDB

Mongo Persistence Engine for NEventStore
MIT License
22 stars 26 forks source link

Unhandled Exception in UpdateStreamHeadAsync calling TryMongo #46

Closed Hinni closed 8 years ago

Hinni commented 8 years ago

We got an issue in the MongoPersistenceEngine. The function “UpdateStreamHeadAsync” does not expect an error in the “TryMongo” at line 516, which is possible, after it enters in a seperate thread from the ThreadPool.QueueUserWorkItem. The TryMongo is not in the try-catch, what leads to problems if the connection is not available. Obviously it is executed in a separated thread.

Of course we can handle the "unhandled exception", but it's not a good solution.

alkampfergit commented 8 years ago

It seems a duplicate of #35, you are experiencing this issue even with version 5.3.5 of the driver?

Hinni commented 8 years ago

@alkampfergit thank you for your response. No it's not a duplicate. It happens before the try catch. Our connection is sometimes unstable. The TryMongo() fail and an unhandled exception occurs.

alkampfergit commented 8 years ago

Ok, I'll take a look tomorrow, thanks!

Hinni commented 8 years ago

Thank you for the quick fix @alkampfergit . When can we get the new 5.3.6 from nuget? Currently there is 5.3.5 the newest version available.

alkampfergit commented 8 years ago

Published on nuget right now.