Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      According to typespec fabric:open_revs should return

      • {ok, #doc{}}
      • {{not_found,missing}, revision()}

      However in the case when the coordinator receive rexi_EXIT from multiple workers before the reply (for example when the worker crashes) the open_revs reply becomes {ok, []}.
      This is due to the fact that we dispatch rexi_DOWN and rexi_EXIT recursively to handle_message({ok, Replies} see here. Note that we set reply to be [] and worker to be nil.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user tonysun83 opened a pull request:

          https://github.com/apache/couchdb-fabric/pull/86

          Return Error When Workers Crash

          Currently, when one worker survives in fabric_open_revs, we return that
          as the response. However, when all workers crash, we still return

          {ok, []}. This changes the response to an error.

          COUCHDB-3113

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

          $ git pull https://github.com/cloudant/couchdb-fabric 68661-fix-open-revs

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

          https://github.com/apache/couchdb-fabric/pull/86.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 #86

          ----
          commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51
          Author: Tony Sun <tony.sun@cloudant.com>
          Date: 2017-01-25T21:47:00Z

          Return error when workers crash

          Currently, when one worker survives in fabric_open_revs, we return that
          as the response. However, when all workers crash, we still return
          {ok, []}

          . This changes the response to an error.

          COUCHDB-3113


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user tonysun83 opened a pull request: https://github.com/apache/couchdb-fabric/pull/86 Return Error When Workers Crash Currently, when one worker survives in fabric_open_revs, we return that as the response. However, when all workers crash, we still return {ok, []}. This changes the response to an error. COUCHDB-3113 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-fabric 68661-fix-open-revs Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-fabric/pull/86.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 #86 ---- commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51 Author: Tony Sun <tony.sun@cloudant.com> Date: 2017-01-25T21:47:00Z Return error when workers crash Currently, when one worker survives in fabric_open_revs, we return that as the response. However, when all workers crash, we still return {ok, []} . This changes the response to an error. COUCHDB-3113
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51 in couchdb-fabric's branch refs/heads/master from Tony Sun
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=dd02a39 ]

          Return error when workers crash

          Currently, when one worker survives in fabric_open_revs, we return that
          as the response. However, when all workers crash, we still return

          {ok, []}

          . This changes the response to an error.

          COUCHDB-3113

          Show
          jira-bot ASF subversion and git services added a comment - Commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51 in couchdb-fabric's branch refs/heads/master from Tony Sun [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=dd02a39 ] Return error when workers crash Currently, when one worker survives in fabric_open_revs, we return that as the response. However, when all workers crash, we still return {ok, []} . This changes the response to an error. COUCHDB-3113
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-fabric/pull/86

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

          GitHub user tonysun83 opened a pull request:

          https://github.com/apache/couchdb-fabric/pull/88

          Use RealReplyCount to distinguish worker replies and invalid docs

          We use

          {ok, []} in couch_db:open_doc_revs_int/3 as a return value
          when the document does not exist and open_revs=all. This leads to an
          incorrect all_workers_died error. We use ReplyCount and RealReplyCount
          to distinguish between when no workers were actually used in a reply
          versus when the document does not exist

          COUCHDB-3113

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

          $ git pull https://github.com/cloudant/couchdb-fabric 68661-separate-reply-count

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

          https://github.com/apache/couchdb-fabric/pull/88.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 #88

          ----
          commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6
          Author: Tony Sun <tony.sun@cloudant.com>
          Date: 2017-02-10T19:23:07Z

          Use RealReplyCount to distinguish worker replies and invalid docs

          We use {ok, []}

          in couch_db:open_doc_revs_int/3 as a return value
          when the document does not exist and open_revs=all. This leads to an
          incorrect all_workers_died error. We use ReplyCount and RealReplyCount
          to distinguish between when no workers were actually used in a reply
          versus when the document does not exist

          COUCHDB-3113


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user tonysun83 opened a pull request: https://github.com/apache/couchdb-fabric/pull/88 Use RealReplyCount to distinguish worker replies and invalid docs We use {ok, []} in couch_db:open_doc_revs_int/3 as a return value when the document does not exist and open_revs=all. This leads to an incorrect all_workers_died error. We use ReplyCount and RealReplyCount to distinguish between when no workers were actually used in a reply versus when the document does not exist COUCHDB-3113 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-fabric 68661-separate-reply-count Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-fabric/pull/88.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 #88 ---- commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 Author: Tony Sun <tony.sun@cloudant.com> Date: 2017-02-10T19:23:07Z Use RealReplyCount to distinguish worker replies and invalid docs We use {ok, []} in couch_db:open_doc_revs_int/3 as a return value when the document does not exist and open_revs=all. This leads to an incorrect all_workers_died error. We use ReplyCount and RealReplyCount to distinguish between when no workers were actually used in a reply versus when the document does not exist COUCHDB-3113
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/master from Tony Sun
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ]

          Use RealReplyCount to distinguish worker replies and invalid docs

          We use

          {ok, []}

          in couch_db:open_doc_revs_int/3 as a return value
          when the document does not exist and open_revs=all. This leads to an
          incorrect all_workers_died error. We use ReplyCount and RealReplyCount
          to distinguish between when no workers were actually used in a reply
          versus when the document does not exist

          COUCHDB-3113

          Show
          jira-bot ASF subversion and git services added a comment - Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/master from Tony Sun [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ] Use RealReplyCount to distinguish worker replies and invalid docs We use {ok, []} in couch_db:open_doc_revs_int/3 as a return value when the document does not exist and open_revs=all. This leads to an incorrect all_workers_died error. We use ReplyCount and RealReplyCount to distinguish between when no workers were actually used in a reply versus when the document does not exist COUCHDB-3113
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-fabric/pull/88

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-fabric/pull/88
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51 in couchdb-fabric's branch refs/heads/2971-count-distinct from Tony Sun
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=dd02a39 ]

          Return error when workers crash

          Currently, when one worker survives in fabric_open_revs, we return that
          as the response. However, when all workers crash, we still return

          {ok, []}

          . This changes the response to an error.

          COUCHDB-3113

          Show
          jira-bot ASF subversion and git services added a comment - Commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51 in couchdb-fabric's branch refs/heads/2971-count-distinct from Tony Sun [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=dd02a39 ] Return error when workers crash Currently, when one worker survives in fabric_open_revs, we return that as the response. However, when all workers crash, we still return {ok, []} . This changes the response to an error. COUCHDB-3113
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/2971-count-distinct from Tony Sun
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ]

          Use RealReplyCount to distinguish worker replies and invalid docs

          We use

          {ok, []}

          in couch_db:open_doc_revs_int/3 as a return value
          when the document does not exist and open_revs=all. This leads to an
          incorrect all_workers_died error. We use ReplyCount and RealReplyCount
          to distinguish between when no workers were actually used in a reply
          versus when the document does not exist

          COUCHDB-3113

          Show
          jira-bot ASF subversion and git services added a comment - Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/2971-count-distinct from Tony Sun [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ] Use RealReplyCount to distinguish worker replies and invalid docs We use {ok, []} in couch_db:open_doc_revs_int/3 as a return value when the document does not exist and open_revs=all. This leads to an incorrect all_workers_died error. We use ReplyCount and RealReplyCount to distinguish between when no workers were actually used in a reply versus when the document does not exist COUCHDB-3113
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51 in couchdb-fabric's branch refs/heads/COUCHDB-3288-remove-public-db-record from Tony Sun
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=dd02a39 ]

          Return error when workers crash

          Currently, when one worker survives in fabric_open_revs, we return that
          as the response. However, when all workers crash, we still return

          {ok, []}

          . This changes the response to an error.

          COUCHDB-3113

          Show
          jira-bot ASF subversion and git services added a comment - Commit dd02a3938f267716e3479b7162e0b0a4f8ba3d51 in couchdb-fabric's branch refs/heads/ COUCHDB-3288 -remove-public-db-record from Tony Sun [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=dd02a39 ] Return error when workers crash Currently, when one worker survives in fabric_open_revs, we return that as the response. However, when all workers crash, we still return {ok, []} . This changes the response to an error. COUCHDB-3113
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/COUCHDB-3288-remove-public-db-record from Tony Sun
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ]

          Use RealReplyCount to distinguish worker replies and invalid docs

          We use

          {ok, []}

          in couch_db:open_doc_revs_int/3 as a return value
          when the document does not exist and open_revs=all. This leads to an
          incorrect all_workers_died error. We use ReplyCount and RealReplyCount
          to distinguish between when no workers were actually used in a reply
          versus when the document does not exist

          COUCHDB-3113

          Show
          jira-bot ASF subversion and git services added a comment - Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/ COUCHDB-3288 -remove-public-db-record from Tony Sun [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ] Use RealReplyCount to distinguish worker replies and invalid docs We use {ok, []} in couch_db:open_doc_revs_int/3 as a return value when the document does not exist and open_revs=all. This leads to an incorrect all_workers_died error. We use ReplyCount and RealReplyCount to distinguish between when no workers were actually used in a reply versus when the document does not exist COUCHDB-3113
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Tony Sun
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ]

          Use RealReplyCount to distinguish worker replies and invalid docs

          We use

          {ok, []}

          in couch_db:open_doc_revs_int/3 as a return value
          when the document does not exist and open_revs=all. This leads to an
          incorrect all_workers_died error. We use ReplyCount and RealReplyCount
          to distinguish between when no workers were actually used in a reply
          versus when the document does not exist

          COUCHDB-3113

          Show
          jira-bot ASF subversion and git services added a comment - Commit 70535eeb9b9c226129bdc96cbca8492fbc867cf6 in couchdb-fabric's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Tony Sun [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=70535ee ] Use RealReplyCount to distinguish worker replies and invalid docs We use {ok, []} in couch_db:open_doc_revs_int/3 as a return value when the document does not exist and open_revs=all. This leads to an incorrect all_workers_died error. We use ReplyCount and RealReplyCount to distinguish between when no workers were actually used in a reply versus when the document does not exist COUCHDB-3113

            People

            • Assignee:
              Unassigned
              Reporter:
              iilyak ILYA
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development