agola/internal/services/configstore
Simone Gotti 85876310af readdb: fix deadlock in Run method
In runservice readdb Run method we could end with a deadlock if two of the
goroutines that call HandleEvents.* try to write to the errCh at the same
time before the errCh is read. If this happens one of the two will be blocked on
writing to the channel but the read won't happen since it'll blocked by
wg.Wait().

Fix this doing:
* use a buffered channel large as the number of executed goroutines.
* create a new errCh at every loop (so we'll ignore later errors after the first
one)

Note: we could also use a non blocking send to avoid this situation but we
should also start the wg.Wait before the goroutines or earlier errors could be
lost causing another kind of hang.
2019-07-23 14:56:26 +02:00
..
action configstore: add parenttype to related tables 2019-07-09 10:16:45 +02:00
api configstore: implement secret update 2019-07-08 10:32:32 +02:00
common configstore: fix linter errors 2019-07-02 14:46:00 +02:00
readdb readdb: fix deadlock in Run method 2019-07-23 14:56:26 +02:00
configstore_test.go configstore: update/fix remotesource rename 2019-07-06 14:40:31 +02:00
configstore.go service: handle cors config and use it only on gateway 2019-07-13 23:15:00 +02:00