iilyak opened a new pull request, #5651:
URL: https://github.com/apache/couchdb/pull/5651

   ## Overview
   
   The termination of actors in the dreyfus-clouseau system is handled 
asynchronously. When a clouseau actor terminates (regardless of the reason) the 
dreyfus_index_manager receives an EXIT message. This message serves as a signal 
to remove the corresponding IndexerPid from the registry of active indexes, 
which is maintained in an ETS table.
   Due to the asynchronous nature of this interaction, there is a potential 
race condition: another user might attempt to access an index that has already 
been terminated on the clouseau side, but for which the EXIT message has not 
yet been received by dreyfus. In such cases, dreyfus will attempt a 
gen_server:call (via ioq) to a non-existent PID, resulting in a noproc 
exception and a 500 error for the user.
   This PR addresses the issue by catching the noproc exception and re-opening 
the index automatically.
   
   ## Testing recommendations
   
   You would need a fully functional clouseau installation to test it. The 
testing is essentially to run a test suite to see if there are no regressions. 
   
   ## Related Issues or Pull Requests
   
   This is a replacement PR for https://github.com/apache/couchdb/pull/5649
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] Documentation changes were made in the `src/docs` folder
   - [ ] Documentation changes were backported (separated PR) to affected 
branches
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to