pomerium/pkg/storage
Cuong Manh Le f4cb5ea6e9
pkg/storage/redis: fix multiple data race (#1210)
There are two data race in current code:

 - Call to close pub sub conn and renew pub sub conn
 - Call to close notify channel and send data to it

Fixing them by:

 - Moving pub sub conn creation/renew in the doNotifyLoop
 - Add a lock to guard before close/send data to channel, and also add
 another check for context was done at the beginning of notify loop.

Verifying by running:

	for _ in {1..100}; do
	  go test -race -count=1 ./pkg/storage/redis/...
	done

with no failure.
2020-08-05 22:35:14 +07:00
..
inmemory telmetry: add databroker storage metrics and tracing (#1161) 2020-07-30 18:19:23 -04:00
redis pkg/storage/redis: fix multiple data race (#1210) 2020-08-05 22:35:14 +07:00
encrypted.go databroker: add encryption for records (#1168) 2020-07-30 14:04:31 -06:00
encrypted_test.go databroker: add encryption for records (#1168) 2020-07-30 14:04:31 -06:00
storage.go pkg/storage: introduce storage.Backend Watch method (#1135) 2020-07-27 21:10:47 +07:00
storage_test.go databroker: add encryption for records (#1168) 2020-07-30 14:04:31 -06:00