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:
Sandor Szücs
2026-02-24 09:01:40 +01:00
committed by GitHub
parent 446f836c39
commit 7cafd621d3
+2
View File
@@ -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