Fix COUCHDB-1363 - race condition in couch_changes
authorRandall Leeds <randall@apache.org>
Thu, 15 Dec 2011 04:12:08 +0000 (20:12 -0800)
committerRandall Leeds <randall@apache.org>
Fri, 16 Dec 2011 00:45:33 +0000 (16:45 -0800)
commit573a7bb90bb86fac6143abbd0f46e1487136f7b7
tree82f686e718944261a395e5d45f8b7c9193db4caa
parent2d90a1249dea1d02d46266d52a0d269f0a33dbb0
Fix COUCHDB-1363 - race condition in couch_changes

It's necessary to re-open the #db after subscribing to notifications
so that updates are not lost. In practice, this is rarely problematic
because the next change will cause everything to catch up, but if a
quick burst of changes happens while replication is starting the
replication can go stale. Detected by intermittent replicator_db js
test failures.
src/couchdb/couch_changes.erl