Skip to content

CDRIVER-4502: Handle int64 connectionId values in hello responses #1121

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

Merged

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Oct 14, 2022

CDRIVER-4502

This updates the server description and command monitoring struct to store the connection ID as int64_t to reflect the type returned by the server. mongoc_server_description_handle_hello was updated to accept any integer for the connectionId field in the response and will read the field as int64.

To preserve backward compatibility, mongoc_apm_command_started_get_server_connection_id (and the equivalent methods for other command monitoring events) still return the value as int32_t. If the connection ID returned from the server exceeds the 32-bit range, -1 is returned.

@alcaeus alcaeus requested a review from kevinAlbs October 14, 2022 08:49
@alcaeus alcaeus self-assigned this Oct 14, 2022
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

Thank you for the fix.

@kevinAlbs kevinAlbs merged commit 5450450 into mongodb:master Oct 17, 2022
@alcaeus alcaeus deleted the cdriver-4502-handle-int64-connectionId branch October 17, 2022 04:15
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