Skip to content

PHPC-1274: Reset client after forking for executeBulkWrite #1092

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

Closed
wants to merge 2 commits into from

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Feb 3, 2020

@jmikola jmikola requested a review from alcaeus February 3, 2020 04:16
Child executes insert
Child exits
Parent waited for child to exit
Sessions used: 2
Copy link
Member Author

Choose a reason for hiding this comment

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

Without the patch to reset the client in executeBulkWrite(), the child process would re-use the same implicit session from the parent's pool and we'd only see one unique LSID instead of two.

Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

Found one unused variable, but LGTM 👍

$manager->executeBulkWrite(NS, $bulk);
});

$parentPid = getmypid();
Copy link
Member

Choose a reason for hiding this comment

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

I believe this variable is obsolete like the others that you removed.

alcaeus added a commit that referenced this pull request Feb 3, 2020
@alcaeus
Copy link
Member

alcaeus commented Feb 3, 2020

Merged in a8a0858.

@alcaeus alcaeus closed this Feb 3, 2020
@jmikola jmikola deleted the phpc-1274 branch February 3, 2020 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants