mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-05 14:37:45 +00:00
fix(fields): await running queries during trigger (#8391)
# Which Problems Are Solved During triggering of the fields table WriteTooOld errors can occure when using cockroachdb. # How the Problems Are Solved The statements exclusively lock the projection before they start to insert data by using `FOR UPDATE`.
This commit is contained in:
parent
0f6003f9a1
commit
646ffe7a26
@ -113,6 +113,8 @@ func (h *FieldHandler) processEvents(ctx context.Context, config *triggerConfig)
|
||||
}
|
||||
}()
|
||||
|
||||
// always await currently running transactions
|
||||
config.awaitRunning = true
|
||||
currentState, err := h.currentState(ctx, tx, config)
|
||||
if err != nil {
|
||||
if errors.Is(err, errJustUpdated) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user