Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0
    • Component/s: None
    • Labels:
      None

      Description

      It's possible to crash couch_server if the delete message for a database is received before the asynchronous open_result message.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user rnewson opened a pull request:

          https://github.com/apache/couchdb-couch/pull/214

          Handle open_result message that arrives after the delete

          Opening a database is asynchronous, therefore it's possible for the
          database to have been deleted before the open is complete. The
          open_result code assumes this doesn't happen, so when it does,
          couch_server crashes, taking the couch_dbs ETS table with it.

          Explicitly handle the case and keep on keeping on.

          COUCHDB-3241

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/cloudant/couchdb-couch 3241-async-open-sync-delete

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/couchdb-couch/pull/214.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #214


          commit 54890e1b8f1d44225ed559ec53f7bf1f4402435b
          Author: Robert Newson <rnewson@apache.org>
          Date: 2016-11-23T15:20:11Z

          Handle open_result message that arrives after the delete

          Opening a database is asynchronous, therefore it's possible for the
          database to have been deleted before the open is complete. The
          open_result code assumes this doesn't happen, so when it does,
          couch_server crashes, taking the couch_dbs ETS table with it.

          Explicitly handle the case and keep on keeping on.

          COUCHDB-3241


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user rnewson opened a pull request: https://github.com/apache/couchdb-couch/pull/214 Handle open_result message that arrives after the delete Opening a database is asynchronous, therefore it's possible for the database to have been deleted before the open is complete. The open_result code assumes this doesn't happen, so when it does, couch_server crashes, taking the couch_dbs ETS table with it. Explicitly handle the case and keep on keeping on. COUCHDB-3241 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-couch 3241-async-open-sync-delete Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch/pull/214.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #214 commit 54890e1b8f1d44225ed559ec53f7bf1f4402435b Author: Robert Newson <rnewson@apache.org> Date: 2016-11-23T15:20:11Z Handle open_result message that arrives after the delete Opening a database is asynchronous, therefore it's possible for the database to have been deleted before the open is complete. The open_result code assumes this doesn't happen, so when it does, couch_server crashes, taking the couch_dbs ETS table with it. Explicitly handle the case and keep on keeping on. COUCHDB-3241
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 54890e1b8f1d44225ed559ec53f7bf1f4402435b in couchdb-couch's branch refs/heads/master from Robert Newson
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=54890e1 ]

          Handle open_result message that arrives after the delete

          Opening a database is asynchronous, therefore it's possible for the
          database to have been deleted before the open is complete. The
          open_result code assumes this doesn't happen, so when it does,
          couch_server crashes, taking the couch_dbs ETS table with it.

          Explicitly handle the case and keep on keeping on.

          COUCHDB-3241

          Show
          jira-bot ASF subversion and git services added a comment - Commit 54890e1b8f1d44225ed559ec53f7bf1f4402435b in couchdb-couch's branch refs/heads/master from Robert Newson [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=54890e1 ] Handle open_result message that arrives after the delete Opening a database is asynchronous, therefore it's possible for the database to have been deleted before the open is complete. The open_result code assumes this doesn't happen, so when it does, couch_server crashes, taking the couch_dbs ETS table with it. Explicitly handle the case and keep on keeping on. COUCHDB-3241
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-couch/pull/214

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-couch/pull/214

            People

            • Assignee:
              Unassigned
              Reporter:
              rnewson Robert Newson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development