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

Add support to ignore MongoDB handshaking frames #1776

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

kpattaswamy
Copy link
Member

Summary: When end to end testing MongoDB tracing, the parser encountered OP_MSG handshaking frames and was not able to parse them. This was due to the old parser searching for a CRUD command in the OP_MSG frame's top level key in the payload and OP_MSG handshaking frames not containing a key the old parser could interpret.

This PR adds support to parse top level handshaking keys and discards those frames at stitching time. It also correctly prefixes const variables in the types.h file.

The motivation to parse these frames instead of immediately ignoring them at parsing time is to account for the different possibilities of responses for a handshaking request. A handshaking request could lead to a more_to_come response where each frame in the more_to_come response may not be identifiable as a handshaking frame. It's also possible that the response of a handshaking request may contain an ok key which can be misidentified as a non handshaking response and left stale in the map of response deques. Identifying all of the handshaking request/response frames at stitching time but not inserting it to the records would ensure that all handshaking frames are cleared from the map and not pushed to the data table.

Related issues: #640

Type of change: /kind bug

Test Plan: Added a stitcher test

Copy link
Member

@ddelnano ddelnano left a comment

Choose a reason for hiding this comment

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

Two minor comments but otherwise lgtm.

@kpattaswamy kpattaswamy marked this pull request as ready for review November 29, 2023 06:15
@kpattaswamy kpattaswamy requested a review from a team November 29, 2023 06:16
@vihangm vihangm merged commit 05964bd into pixie-io:main Nov 30, 2023
32 checks passed
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.

3 participants