mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
fix race accessing registeredTriggers (#8365)
ref: https://github.com/open-policy-agent/opa/issues/8363 Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
This commit is contained in:
@@ -980,9 +980,11 @@ func (m *Manager) onCommit(ctx context.Context, txn storage.Transaction, event s
|
||||
m.opaReportNotifyCh <- struct{}{}
|
||||
}
|
||||
|
||||
m.mtx.Lock()
|
||||
for _, f := range m.registeredTriggers {
|
||||
f(txn)
|
||||
}
|
||||
m.mtx.Unlock()
|
||||
}
|
||||
|
||||
// Similar to the compiler, look for a set of resolvers on the transaction
|
||||
|
||||
Reference in New Issue
Block a user