Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3109

500 when include_docs=true for linked documents

    Details

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

      Description

      The problem happen when following conditions are satisfied:

      • query has include_docs=true
      • one of the shards returns any error or times out

      In this case we would have case_clause error either

      This case_clause error propagates to transform_row and fails there since transform_row doesn't have a clause to handle errors.

        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/87

          Add Else Clause For Embed Doc

          When open_doc or open_revs return an error, we set the doc value
          to be an error message. This way we account for errors rather than
          transform_row throwing a function_clause.

          This PR will not be merged until https://github.com/apache/couchdb-fabric/pull/86 is merged.
          Another PR for chttpd will contain end-to-end tests that will cover the testing for this PR.

          COUCHDB-3109

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

          $ git pull https://github.com/cloudant/couchdb-fabric 68661-embed-doc-error

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

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


          commit 3a8c71485893706e539ba51891a7785ffa0a82e7
          Author: Tony Sun <tony.sun@cloudant.com>
          Date: 2017-02-01T04:47:13Z

          Add Else Clause For Embed Doc

          When open_doc or open_revs return an error, we set the doc value
          to be an error message. This way we account for errors rather than
          transform_row throwing a function_clause.

          COUCHDB-3109


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user tonysun83 opened a pull request: https://github.com/apache/couchdb-fabric/pull/87 Add Else Clause For Embed Doc When open_doc or open_revs return an error, we set the doc value to be an error message. This way we account for errors rather than transform_row throwing a function_clause. This PR will not be merged until https://github.com/apache/couchdb-fabric/pull/86 is merged. Another PR for chttpd will contain end-to-end tests that will cover the testing for this PR. COUCHDB-3109 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-fabric 68661-embed-doc-error Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-fabric/pull/87.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 #87 commit 3a8c71485893706e539ba51891a7785ffa0a82e7 Author: Tony Sun <tony.sun@cloudant.com> Date: 2017-02-01T04:47:13Z Add Else Clause For Embed Doc When open_doc or open_revs return an error, we set the doc value to be an error message. This way we account for errors rather than transform_row throwing a function_clause. COUCHDB-3109
          Hide
          jira-bot ASF subversion and git services added a comment -

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

          Add Else Clause For Embed Doc

          When open_doc or open_revs return an error, we set the doc value
          to be an error message. This way we account for errors rather than
          transform_row throwing a function_clause.

          COUCHDB-3109

          Show
          jira-bot ASF subversion and git services added a comment - Commit cf220b2e927093e3bd6f409b4ca9f7b1be0a04a3 in couchdb-fabric's branch refs/heads/master from Tony Sun [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=cf220b2 ] Add Else Clause For Embed Doc When open_doc or open_revs return an error, we set the doc value to be an error message. This way we account for errors rather than transform_row throwing a function_clause. COUCHDB-3109
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tonysun83 closed the pull request at:

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

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

          Commit cf220b2e927093e3bd6f409b4ca9f7b1be0a04a3 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=cf220b2 ]

          Add Else Clause For Embed Doc

          When open_doc or open_revs return an error, we set the doc value
          to be an error message. This way we account for errors rather than
          transform_row throwing a function_clause.

          COUCHDB-3109

          Show
          jira-bot ASF subversion and git services added a comment - Commit cf220b2e927093e3bd6f409b4ca9f7b1be0a04a3 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=cf220b2 ] Add Else Clause For Embed Doc When open_doc or open_revs return an error, we set the doc value to be an error message. This way we account for errors rather than transform_row throwing a function_clause. COUCHDB-3109
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit cf220b2e927093e3bd6f409b4ca9f7b1be0a04a3 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=cf220b2 ]

          Add Else Clause For Embed Doc

          When open_doc or open_revs return an error, we set the doc value
          to be an error message. This way we account for errors rather than
          transform_row throwing a function_clause.

          COUCHDB-3109

          Show
          jira-bot ASF subversion and git services added a comment - Commit cf220b2e927093e3bd6f409b4ca9f7b1be0a04a3 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=cf220b2 ] Add Else Clause For Embed Doc When open_doc or open_revs return an error, we set the doc value to be an error message. This way we account for errors rather than transform_row throwing a function_clause. COUCHDB-3109
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit cf220b2e927093e3bd6f409b4ca9f7b1be0a04a3 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=cf220b2 ]

          Add Else Clause For Embed Doc

          When open_doc or open_revs return an error, we set the doc value
          to be an error message. This way we account for errors rather than
          transform_row throwing a function_clause.

          COUCHDB-3109

          Show
          jira-bot ASF subversion and git services added a comment - Commit cf220b2e927093e3bd6f409b4ca9f7b1be0a04a3 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=cf220b2 ] Add Else Clause For Embed Doc When open_doc or open_revs return an error, we set the doc value to be an error message. This way we account for errors rather than transform_row throwing a function_clause. COUCHDB-3109

            People

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

              Dates

              • Created:
                Updated:

                Development