Closed iamnotacake closed 2 years ago
shouldn't we use mutex anywhere?
shouldn't we use mutex anywhere?
mutexes should be used to synchronize access to shared objects. Here is data related to 2 connections (app <> acra, acra <> db), and handled by 2 goroutines. If 2 goroutines change/update same data - then we should. If only one of them touches data at same time - then we shouldn't. For example if we touch data related to client's side packets in goroutine that work with client side connection, then we can omit mutexes because of opposite goroutine will not touch same data/buffers/processes.
pendingParse
after receivingParseComplete
pendingBind
(sensitive data inside) after receivingBindComplete
pendingBind
(set tonil
) after receivingReadyForQuery
Also, tiny fix in integration tests so
DEBUG_LOG=False
env var will really make AcraServer logs less verbose.Checklist
postgres
driver, manually ensured it does not reproduce any more