The race condition between providers is fixed 4/head
authorILYA Khlopotov <iilyak@ca.ibm.com>
Tue, 14 Jul 2015 15:27:37 +0000 (08:27 -0700)
committerILYA Khlopotov <iilyak@ca.ibm.com>
Fri, 17 Jul 2015 17:11:25 +0000 (10:11 -0700)
commit822f3a265bc45707def9ca10063a43edb5898d16
tree995c1e45a0e2787de0b6d14b954880d4309187e4
parent3d0e6a6b38cdeee165a3464a37f6d9357b798d27
The race condition between providers is fixed

In previous design there is a race condition between the time we read the
current definitions in the generated module and the time we compile new
version of it. This race led to overwriting of data of already
configured providers.

This commit fixes the issue by introducing couch_epi_module_keeper
process. This process is named by generated module name and it is
essentially a requests serializer.
src/couch_epi_data.erl
src/couch_epi_data_gen.erl
src/couch_epi_functions.erl
src/couch_epi_functions_gen.erl
src/couch_epi_keeper_sup.erl [new file with mode: 0644]
src/couch_epi_module_keeper.erl [new file with mode: 0644]
src/couch_epi_sup.erl