-
Notifications
You must be signed in to change notification settings - Fork 266
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
Bug/693 ontimeinterval subscription recovery #697
Conversation
static void destroyOnTimeIntervalThread(std::string tenant, BSONObj* subP) | ||
{ | ||
BSONElement idField = subP->getField("_id"); | ||
std::string subId = idField.OID().str(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not apply "Paranoia check (I)" also in that place for subId?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, those checks were there already and I decided to let them stay.
I can put one in here too if you want :-) (probably not necessary but it doesn't hurt)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in afcf920
LGTM |
…cription_recovery Bug/693 ontimeinterval subscription recovery
Fixed the bug of issue #693.
This fix will probably also solve the mysterious case of 'false leaks' we've been seeing (and trying to fix).
Instead of creating a vector of subscriptions, a callback function (treating the subscription) is sent to the function that loops over the subscriptions.
The bug in the previous implementation was that the vector got corrupted as soon as the function that created the vector finished (symptom telling us we had stuff on the stack - in this case the BSON objects inside the vector).