You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/07/21 19:45:47 UTC

[GitHub] [couchdb] davisp opened a new pull request #2077: Make sure that fsync errors are raised

davisp opened a new pull request #2077: Make sure that fsync errors are raised
URL: https://github.com/apache/couchdb/pull/2077
 
 
   This changes `couch_file` to ensure that errors are raised when a call
   to `fsync` fails. It will also stop the couch_file process to ensure
   that anything handling a failed `fsync` won't attempt to retry the
   operation and experience issues discovered by Postgres [1].
   
   [1] http://danluu.com/fsyncgate/
   
   ## Overview
   
   See http://danluu.com/fsyncgate/
   
   ## Testing recommendations
   
   `make eunit`
   
   However, I don't have a good test to assert that the `couch_file` pid exits since the `file` module is quite difficult to get mocked. I'm all ears on how to make this better. My only thought was that I'd have to export a function that can be mocked but it seems weird to have `handle_call` calling a fully qualified exported function just to test that.
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [x] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
   - [x] N/A - A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services