A Txn has a commitTriggers field:
// commitTriggers are run upon successful commit.
commitTriggers []func()
They are always reset before an auto-retry. However, they are not reset before a user-directed retry. So I believe a trigger can be executed multiple times. We should figure out another strategy for clearing them.
cc @spencerkimball @nvanbenschoten
Jira issue: CRDB-6016
A
Txnhas acommitTriggersfield:They are always reset before an auto-retry. However, they are not reset before a user-directed retry. So I believe a trigger can be executed multiple times. We should figure out another strategy for clearing them.
cockroach/pkg/internal/client/txn.go
Line 769 in ef021b3
cc @spencerkimball @nvanbenschoten
Jira issue: CRDB-6016