Skip to content

Nested InTx() makes inner tx apply 0 changes #2468

Closed

Description

@Emyrk

Current Behavior

If you nest InTx(), the inner tx does nothing. It also breaks the outer tx

	db.InTx(func(outer database.Store) error {
		return outer.InTx(func(inner database.Store) error {
                        // inner.* will not actually do anything
			return nil
		})
	})

Expected behavior

If you nest InTx(), the inner Tx should just extend/reuse the outer TX.

Activity

  1. self-assigned this
    on Jun 17, 2022
  2. Emyrk commented on Jun 17, 2022

    @Emyrk
    MemberAuthor

    PR coming

    #2470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions