Skip to content
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

Merged
merged 4 commits into from
Jan 5, 2015

Conversation

kzangeli
Copy link
Member

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).

@kzangeli kzangeli added the bug label Dec 23, 2014
@kzangeli kzangeli added this to the Release 0.18.1 milestone Dec 23, 2014
@kzangeli kzangeli mentioned this pull request Dec 29, 2014
static void destroyOnTimeIntervalThread(std::string tenant, BSONObj* subP)
{
BSONElement idField = subP->getField("_id");
std::string subId = idField.OID().str();
Copy link
Member

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?

Copy link
Member Author

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)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in afcf920

@fgalan
Copy link
Member

fgalan commented Jan 5, 2015

LGTM

fgalan pushed a commit that referenced this pull request Jan 5, 2015
…cription_recovery

Bug/693 ontimeinterval subscription recovery
@fgalan fgalan merged commit d57d89c into develop Jan 5, 2015
@fgalan fgalan deleted the bug/693_ontimeinterval_subscription_recovery branch January 5, 2015 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants