mcollina / mqemitter-mongodb

MongoDB based MQEmitter
MIT License
18 stars 10 forks source link

Avoid leaking data #10

Closed mcollina closed 6 years ago

mcollina commented 6 years ago

Fixes https://github.com/mcollina/mqemitter-mongodb/issues/9

@teomurgi can you please check if this fixes it?

teomurgi commented 6 years ago

We run a 62 hours test with aedes deployed in a container. The issue is greatly reduced: over 56 millions of messages only 4 messages have been leaked. Thus there is still an unknown condition that make it happen, but the module is way better with this PR.

We had previously run several smaller test with the same result in which a tiny minority of messages have been leaked.

mcollina commented 6 years ago

If you can create a repro for that condition, I would be extremely happy to do a fix for that. Tracking down a 6.15384615e-8 probability of leakage is extremely hard.

teomurgi commented 6 years ago

Yes I know, we are struggling creating an example that maximizes the number of occurrences to a debuggable number... I'll let you know, thanks