You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/04/18 19:03:32 UTC
[GitHub] davisp opened a new pull request #481: Fix couch_auth_cache reinitialization logic
davisp opened a new pull request #481: Fix couch_auth_cache reinitialization logic
URL: https://github.com/apache/couchdb/pull/481
The couch_auth_cache process was attempting to track its various
monitors and then based on its monitor history decide if a 'DOWN'
message meant it should reinitialize or exit. With the new pluggable
storage engine work there was a subtle change to monitors which ended up
causing couch_auth_cache to receive a monitor from the file descriptor
before it received the monitor from the database's main pid. This
reordering was enough for couch_auth_cache to exit which ended up
causing errors in the test suite with race conditions when the test
tried to open an auth db before couch_auth_cache had restarted and
created the database.
However, if we step back and think harder, we'll never get a monitor
message we didn't ask for so rather than attempt to track specific
monitors we just reinitialize the cache everytime we see a 'DOWN'
message. On the downside this means that we're clearing the cache
multiple times per database exit, however normal operations won't have
this issue since that database never changes and clearing the cache
twice in the test suite is a non issue.
COUCHDB-3379
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services