mirror of https://github.com/hashicorp/boundary
fix(event): Prevent eventer data races by removing shallow object copy (#5139)
This issue was surfaced through other changes (PR 5137). Given that the eventer works in a singleton pattern (see sysEventer global variable), performing this shallow object copy can cause a data race because the copy operation reads the underlying eventer data structures. At the same time, given the global nature of this eventer, other goroutines can be writing to those same data structures. Since we're already using a singleton pattern in this package, and given that the current copy operation is shallow, copying the object doesn't seem necessary, so this commit changes `StandardWriter` to build the `logAdapter` with the `e` eventer directly instead of copying it.pull/5137/head
parent
de141e34a9
commit
22b54c8b97
Loading…
Reference in new issue