mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-07 09:07:43 +00:00
fix(fields): use read commit isolation level in trigger (#8410)
# Which Problems Are Solved If the processing time of serializable transactions in the fields handler take too long, the next iteration can fail. # How the Problems Are Solved Changed the isolation level of the current states query to Read Commited
This commit is contained in:
parent
c6b405ca96
commit
523d73f674
@ -97,7 +97,7 @@ func (h *FieldHandler) processEvents(ctx context.Context, config *triggerConfig)
|
|||||||
defer cancel()
|
defer cancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
tx, err := h.client.BeginTx(txCtx, nil)
|
tx, err := h.client.BeginTx(txCtx, &sql.TxOptions{Isolation: sql.LevelReadCommitted})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ func (es *Eventstore) FillFields(ctx context.Context, events ...eventstore.FillF
|
|||||||
ctx, span := tracing.NewSpan(ctx)
|
ctx, span := tracing.NewSpan(ctx)
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
||||||
tx, err := es.client.BeginTx(ctx, nil)
|
tx, err := es.client.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelReadCommitted})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user