10000 Nested `InTx()` makes inner tx apply 0 changes · Issue #2468 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content
Nested InTx() makes inner tx apply 0 changes #2468
Closed
@Emyrk

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.

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

    0