-
Notifications
You must be signed in to change notification settings - Fork 208
[WAIT] PHPC-1274: Reset libmongoc client after forking #941
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
Conversation
|
Good catch :) |
Note: the current version of this PR scatters pid checks throughout the driver. Although calls to An alternative approach could entail exposing the API for |
3a6f01e
to
7550735
Compare
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.
lgtm overall, just a naming nit.
php_phongo.h
Outdated
@@ -212,6 +212,13 @@ zend_bool phongo_writeconcernerror_init(zval* return_value, bson_t* bson TSRMLS_ | |||
#define PHONGO_ZVAL_CLASS_OR_TYPE_NAME(zv) (Z_TYPE(zv) == IS_OBJECT ? ZSTR_VAL(Z_OBJCE(zv)->name) : zend_get_type_by_const(Z_TYPE(zv))) | |||
#define PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(zvp) PHONGO_ZVAL_CLASS_OR_TYPE_NAME(*(zvp)) | |||
|
|||
#define PHONGO_CHECK_CLIENT_PID(client, created_by_pid) \ |
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.
This name could be more descriptive of what it does.
Perhaps: PHONGO_CLIENT_RESET_IF_CHIlD_PID(...)
Check pid before operations that could interfere with resources owned by the parent process. This includes freeing Cursor and Session objects, executing operations on the Manager or Server, or iterating a Cursor.
Standalone SSL failure is pending CDRIVER-3116. |
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.
looks good to me
Closing after discussion summarised in this comment. |
https://jira.mongodb.org/browse/PHPC-1274
This is not suitable for merging. Just opening so we have a POC to look at.