Skip to content

Commit

Permalink
Update diesel-dtrace, fix transaction depth predicate in probe
Browse files Browse the repository at this point in the history
  • Loading branch information
bnaecker committed Dec 13, 2024
1 parent 7b99029 commit c371852
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions tools/dtrace/nexus/trace-transactions.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,9 @@ diesel_db$target:::query-start
/*
* As transactions complete, print the number of statements we ran and the
* duration.
*
* NOTE: The depth, arg1, is intentionally 1 here. When we first enter a
* non-nested transaction, the depth is 0, because there is no outer
* transaction. However, when the `transaction-done` probe fires, we are still
* in a transaction, in which case the depth is currently 1. It's decremented
* _after_ the transaction itself is committed or rolled back.
*/
diesel_db$targe:::transaction-done
/arg1 == 1 && ts[copyinstr(arg0)]/
diesel_db$target:::transaction-done
/arg1 == 0 && ts[copyinstr(arg0)]/
{
this->key = copyinstr(arg0);
this->conn_id = json(this->key, "ok");
Expand Down

0 comments on commit c371852

Please sign in to comment.