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

Improve extended protocol and tx block support #51

Merged
merged 8 commits into from
Sep 3, 2024
Merged

Improve extended protocol and tx block support #51

merged 8 commits into from
Sep 3, 2024

Conversation

bonnefoa
Copy link
Collaborator

@bonnefoa bonnefoa commented Sep 3, 2024

  • Add tests using the new psql extended protocol metacommand
  • In extended protocol, end the previous top span at the parse of the next command to avoid overlap
  • Whenever the tx is explicitely sampled, fallback to the tx's traceparent when the statement is not explicitely sampled

A begin sent with extended protocol will parse the statement in a
separate transaction, leading to the creation of a tx block with only
the parse begin. Avoid this by only creating tx block within
ProcessUtility or if there's already an ongoing tx block within post
parse.
Previously, tx's traceparent was only used during post parse. However,
a statement can skip parse (prepared statement) and directly go to
planner, Executor Start (cached plan) or ProcessUtility. Fallback to
tx's traceparent when the stmt is not sampled.
Make it clearer that the span is stored instead of relying of whether ts
provided is null or not
@bonnefoa bonnefoa merged commit 03ba9ac into main Sep 3, 2024
4 checks passed
@bonnefoa bonnefoa deleted the tx-block branch September 3, 2024 08:40
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.

1 participant