-
Notifications
You must be signed in to change notification settings - Fork 198
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
PHPC-495: Upgrade bundled libbson and libmongoc to 1.3.0 #141
PHPC-495: Upgrade bundled libbson and libmongoc to 1.3.0 #141
Conversation
7be2f41
to
fc557d5
Compare
phongo_server_init(return_value, intern->client, server_id TSRMLS_CC); | ||
selected_server = mongoc_topology_select(intern->client->topology, MONGOC_SS_READ, readPreference, MONGOC_SS_DEFAULT_LOCAL_THRESHOLD_MS, &error); | ||
if (selected_server) { | ||
phongo_server_init(return_value, intern->client, selected_server->id TSRMLS_CC); |
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.
My bad. This leaks the server_description.
mongoc_server_description_destroy (selected_server);
Is needed after the server_init ()
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: derickr@e9a9517
5adc83c
to
bc05644
Compare
} else if (!sd1) { | ||
phongo_throw_exception(PHONGO_ERROR_RUNTIME TSRMLS_CC, "%s", error1.message); | ||
} else { | ||
phongo_throw_exception(PHONGO_ERROR_RUNTIME TSRMLS_CC, "%s", error2.message); |
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.
I think it would be good to use the same format we do above (when accessing descriptions files). We can use:
- "Failed to get server descriptions: %s and %s"
- "Failed to get server description: %s"
This provides an easily searchable string for the error and avoids any edge case where the message may be empty (if libmongoc misbehaves).
I'd merge #146 to resolve that that Werror issue in mongoc. There is no reason why phongo does this. Do feel free to file a ticket for it in mongoc, but it definitely should not halt phongo development like this. |
…_error_t (CDRIVER-906)
… CDRIVER-1027 is fixed.
caa4250
to
bc9ebcc
Compare
(Also includes fix for PHPC-488)