Skip to content

client: txn commit triggers are reset in the wrong place #18170

@andreimatei

Description

@andreimatei

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.

txn.commitTriggers = nil

cc @spencerkimball @nvanbenschoten

Jira issue: CRDB-6016

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-kv-clientRelating to the KV client and the KV interface.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-kvKV Team

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions