Skip to content

Fix race in couchdb_views_tests#600

Merged
eiri merged 1 commit into
apache:masterfrom
cloudant:fix-couchdb_views_tests
Jun 16, 2017
Merged

Fix race in couchdb_views_tests#600
eiri merged 1 commit into
apache:masterfrom
cloudant:fix-couchdb_views_tests

Conversation

@eiri
Copy link
Copy Markdown
Member

@eiri eiri commented Jun 16, 2017

Overview

There are a race condition in restore_backup_db_file function between couch_server eviction of an old db updater and a test quering view on restored db file. The query in test can get old record for the updater and then crash with noproc exception.

This change makes restore_backup_db_file to wait until start of the new db updater.

Testing recommendations

The following should pass:

make eunit apps=couch suites=couchdb_views_tests tests=backup_restore_test_

GitHub issue number

Fixes #565

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

There are a race condition in `restore_backup_db_file`
function between couch_server eviction of an old
db updater and a test quering view on restored db file.
The query in test can get old record for the updater
and then crash with `noproc` exception.

This change makes `restore_backup_db_file` to wait
until start of the new db updater.
@nickva
Copy link
Copy Markdown
Contributor

nickva commented Jun 16, 2017

      couchdb_views_tests:backup_restore_test_/0
======================== EUnit ========================
Upgrade and bugs related tests
Application crypto was left running!
  couchdb_views_tests:159: should_not_remember_docs_in_index_after_backup_restore...[0.150 s] ok
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
  [done in 0.282 s]
=======================================================

+1

@eiri eiri merged commit a00d683 into apache:master Jun 16, 2017
@eiri eiri deleted the fix-couchdb_views_tests branch June 16, 2017 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants