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

Detangle "stale" mechanism in to component semantics

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: None
    • Labels:
      None

      Description

      The `stale` mechanism for view queries conflates two independent
      concerns:

      1. Whether or not the view results should be returned from a "stable"
      set of shards; i.e., mem3:ushards. This semantic is new in 2.0,
      having originated in Cloudant code in 2011[1].

      2. Whether or not the view in question should be updated prior to
      responding to the user, i.e., the pre-2.0 semantics.

      Both of these concerns represent consistency/availability tradeoffs, but
      they're addressing rather different aspects of that continuum. As such,
      the "stale" mechanism limits flexibility.

      For example, it's quite likely that a user would want to retrieve
      "stale" view responses from the fastest available shards - the
      "available/available" choice - and this choice is not available with the
      existing "stale" mechanism. A similar argument could be made for the
      "consistent/consistent" choice.

      [1]: https://github.com/apache/couchdb-fabric/commit/93923fda51c714c015b8621e41f3c425bfb3e61a

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user banjiewen opened a pull request:

          https://github.com/apache/couchdb-couch-mrview/pull/51

          Replace `stale` with `stable` and `update`

          The `stale` mechanism for view queries conflates two independent
          concerns:

          1. Whether or not the view results should be returned from a "stable"
          set of shards; i.e., mem3:ushards. This semantic is new in 2.0,
          having originated in Cloudant code in 2011[1].

          2. Whether or not the view in question should be updated prior to
          responding to the user, i.e., the pre-2.0 semantics.

          Both of these concerns represent consistency/availability tradeoffs, but
          they're addressing rather different aspects of that continuum. As such,
          the "stale" mechanism limits flexibility.

          For example, it's quite likely that a user would want to retrieve
          "stale" view responses from the fastest available shards - the
          "available/available" choice - and this choice is not available with the
          existing "stale" mechanism. A similar argument could be made for the
          "consistent/consistent" choice.

          This patch introduces two new view API keywords - "stable" and "update"

          • to address concerns #1 and #2, respectively. The semantics of the
            "stale" mechanism is implemented in terms of these new keywords.

          COUCHDB-3063

          [1]: apache/couchdb-fabric@93923fda51c714c015b8621e41f3c425bfb3e61a

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

          $ git pull https://github.com/banjiewen/couchdb-couch-mrview stale-stable-update

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

          https://github.com/apache/couchdb-couch-mrview/pull/51.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 #51


          commit 459a548f269b00bf2d2ace0170c583e72fde4cb9
          Author: Benjamin Anderson <b@banjiewen.net>
          Date: 2016-07-17T21:25:22Z

          Replace `stale` with `stable` and `update`

          The `stale` mechanism for view queries conflates two independent
          concerns:

          1. Whether or not the view results should be returned from a "stable"
          set of shards; i.e., mem3:ushards. This semantic is new in 2.0,
          having originated in Cloudant code in 2011[1].

          2. Whether or not the view in question should be updated prior to
          responding to the user, i.e., the pre-2.0 semantics.

          Both of these concerns represent consistency/availability tradeoffs, but
          they're addressing rather different aspects of that continuum. As such,
          the "stale" mechanism limits flexibility.

          For example, it's quite likely that a user would want to retrieve
          "stale" view responses from the fastest available shards - the
          "available/available" choice - and this choice is not available with the
          existing "stale" mechanism. A similar argument could be made for the
          "consistent/consistent" choice.

          This patch introduces two new view API keywords - "stable" and "update"

          • to address concerns #1 and #2, respectively. The semantics of the
            "stale" mechanism is implemented in terms of these new keywords.

          COUCHDB-3063

          [1]: apache/couchdb-fabric@93923fda51c714c015b8621e41f3c425bfb3e61a


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user banjiewen opened a pull request: https://github.com/apache/couchdb-couch-mrview/pull/51 Replace `stale` with `stable` and `update` The `stale` mechanism for view queries conflates two independent concerns: 1. Whether or not the view results should be returned from a "stable" set of shards; i.e., mem3:ushards. This semantic is new in 2.0, having originated in Cloudant code in 2011 [1] . 2. Whether or not the view in question should be updated prior to responding to the user, i.e., the pre-2.0 semantics. Both of these concerns represent consistency/availability tradeoffs, but they're addressing rather different aspects of that continuum. As such, the "stale" mechanism limits flexibility. For example, it's quite likely that a user would want to retrieve "stale" view responses from the fastest available shards - the "available/available" choice - and this choice is not available with the existing "stale" mechanism. A similar argument could be made for the "consistent/consistent" choice. This patch introduces two new view API keywords - "stable" and "update" to address concerns #1 and #2, respectively. The semantics of the "stale" mechanism is implemented in terms of these new keywords. COUCHDB-3063 [1] : apache/couchdb-fabric@93923fda51c714c015b8621e41f3c425bfb3e61a You can merge this pull request into a Git repository by running: $ git pull https://github.com/banjiewen/couchdb-couch-mrview stale-stable-update Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch-mrview/pull/51.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 #51 commit 459a548f269b00bf2d2ace0170c583e72fde4cb9 Author: Benjamin Anderson <b@banjiewen.net> Date: 2016-07-17T21:25:22Z Replace `stale` with `stable` and `update` The `stale` mechanism for view queries conflates two independent concerns: 1. Whether or not the view results should be returned from a "stable" set of shards; i.e., mem3:ushards. This semantic is new in 2.0, having originated in Cloudant code in 2011 [1] . 2. Whether or not the view in question should be updated prior to responding to the user, i.e., the pre-2.0 semantics. Both of these concerns represent consistency/availability tradeoffs, but they're addressing rather different aspects of that continuum. As such, the "stale" mechanism limits flexibility. For example, it's quite likely that a user would want to retrieve "stale" view responses from the fastest available shards - the "available/available" choice - and this choice is not available with the existing "stale" mechanism. A similar argument could be made for the "consistent/consistent" choice. This patch introduces two new view API keywords - "stable" and "update" to address concerns #1 and #2, respectively. The semantics of the "stale" mechanism is implemented in terms of these new keywords. COUCHDB-3063 [1] : apache/couchdb-fabric@93923fda51c714c015b8621e41f3c425bfb3e61a
          Hide
          banjiewen Benjamin Anderson added a comment -

          No idea how to assign this to myself, but a WIP PR is here: https://github.com/apache/couchdb-couch-mrview/pull/51

          Show
          banjiewen Benjamin Anderson added a comment - No idea how to assign this to myself, but a WIP PR is here: https://github.com/apache/couchdb-couch-mrview/pull/51
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user banjiewen opened a pull request:

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

          Replace "stale" with "stable" when picking shards

          COUCHDB-3063

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

          $ git pull https://github.com/banjiewen/couchdb-fabric stale-stable-update

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

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


          commit e80a744a02cf6194df9afca8359c561e47034f18
          Author: Benjamin Anderson <b@banjiewen.net>
          Date: 2016-07-17T21:46:54Z

          Replace "stale" with "stable" when picking shards

          COUCHDB-3063


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user banjiewen opened a pull request: https://github.com/apache/couchdb-fabric/pull/64 Replace "stale" with "stable" when picking shards COUCHDB-3063 You can merge this pull request into a Git repository by running: $ git pull https://github.com/banjiewen/couchdb-fabric stale-stable-update Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-fabric/pull/64.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 #64 commit e80a744a02cf6194df9afca8359c561e47034f18 Author: Benjamin Anderson <b@banjiewen.net> Date: 2016-07-17T21:46:54Z Replace "stale" with "stable" when picking shards COUCHDB-3063
          Hide
          banjiewen Benjamin Anderson added a comment -
          Show
          banjiewen Benjamin Anderson added a comment - And the fabric component: https://github.com/apache/couchdb-fabric/pull/64
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user banjiewen opened a pull request:

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

          Replace `stale` with `update` in compression tests

          COUCHDB-3063

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

          $ git pull https://github.com/banjiewen/couchdb-couch stale-stable-update

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

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


          commit 334618e8bfc205948822edbcb8e98fc0b6cc438a
          Author: Benjamin Anderson <b@banjiewen.net>
          Date: 2016-07-17T22:51:12Z

          Replace `stale` with `update` in compression tests

          COUCHDB-3063


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user banjiewen opened a pull request: https://github.com/apache/couchdb-couch/pull/186 Replace `stale` with `update` in compression tests COUCHDB-3063 You can merge this pull request into a Git repository by running: $ git pull https://github.com/banjiewen/couchdb-couch stale-stable-update Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch/pull/186.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 #186 commit 334618e8bfc205948822edbcb8e98fc0b6cc438a Author: Benjamin Anderson <b@banjiewen.net> Date: 2016-07-17T22:51:12Z Replace `stale` with `update` in compression tests COUCHDB-3063
          Hide
          banjiewen Benjamin Anderson added a comment -

          And a small test change in couchdb: https://github.com/apache/couchdb-couch/pull/186

          Show
          banjiewen Benjamin Anderson added a comment - And a small test change in couchdb: https://github.com/apache/couchdb-couch/pull/186
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit e80a744a02cf6194df9afca8359c561e47034f18 in couchdb-fabric's branch refs/heads/master from Benjamin Anderson
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=e80a744 ]

          Replace "stale" with "stable" when picking shards

          COUCHDB-3063

          Show
          jira-bot ASF subversion and git services added a comment - Commit e80a744a02cf6194df9afca8359c561e47034f18 in couchdb-fabric's branch refs/heads/master from Benjamin Anderson [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=e80a744 ] Replace "stale" with "stable" when picking shards COUCHDB-3063
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 459a548f269b00bf2d2ace0170c583e72fde4cb9 in couchdb-couch-mrview's branch refs/heads/master from Benjamin Anderson
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=459a548 ]

          Replace `stale` with `stable` and `update`

          The `stale` mechanism for view queries conflates two independent
          concerns:

          1. Whether or not the view results should be returned from a "stable"
          set of shards; i.e., mem3:ushards. This semantic is new in 2.0,
          having originated in Cloudant code in 2011[1].

          2. Whether or not the view in question should be updated prior to
          responding to the user, i.e., the pre-2.0 semantics.

          Both of these concerns represent consistency/availability tradeoffs, but
          they're addressing rather different aspects of that continuum. As such,
          the "stale" mechanism limits flexibility.

          For example, it's quite likely that a user would want to retrieve
          "stale" view responses from the fastest available shards - the
          "available/available" choice - and this choice is not available with the
          existing "stale" mechanism. A similar argument could be made for the
          "consistent/consistent" choice.

          This patch introduces two new view API keywords - "stable" and "update"

          • to address concerns #1 and #2, respectively. The semantics of the
            "stale" mechanism is implemented in terms of these new keywords.

          COUCHDB-3063

          [1]: apache/couchdb-fabric@93923fda51c714c015b8621e41f3c425bfb3e61a

          Show
          jira-bot ASF subversion and git services added a comment - Commit 459a548f269b00bf2d2ace0170c583e72fde4cb9 in couchdb-couch-mrview's branch refs/heads/master from Benjamin Anderson [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=459a548 ] Replace `stale` with `stable` and `update` The `stale` mechanism for view queries conflates two independent concerns: 1. Whether or not the view results should be returned from a "stable" set of shards; i.e., mem3:ushards. This semantic is new in 2.0, having originated in Cloudant code in 2011 [1] . 2. Whether or not the view in question should be updated prior to responding to the user, i.e., the pre-2.0 semantics. Both of these concerns represent consistency/availability tradeoffs, but they're addressing rather different aspects of that continuum. As such, the "stale" mechanism limits flexibility. For example, it's quite likely that a user would want to retrieve "stale" view responses from the fastest available shards - the "available/available" choice - and this choice is not available with the existing "stale" mechanism. A similar argument could be made for the "consistent/consistent" choice. This patch introduces two new view API keywords - "stable" and "update" to address concerns #1 and #2, respectively. The semantics of the "stale" mechanism is implemented in terms of these new keywords. COUCHDB-3063 [1] : apache/couchdb-fabric@93923fda51c714c015b8621e41f3c425bfb3e61a
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

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

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-couch-mrview/pull/51

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

          Commit 334618e8bfc205948822edbcb8e98fc0b6cc438a in couchdb-couch's branch refs/heads/master from Benjamin Anderson
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=334618e ]

          Replace `stale` with `update` in compression tests

          COUCHDB-3063

          Show
          jira-bot ASF subversion and git services added a comment - Commit 334618e8bfc205948822edbcb8e98fc0b6cc438a in couchdb-couch's branch refs/heads/master from Benjamin Anderson [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=334618e ] Replace `stale` with `update` in compression tests COUCHDB-3063
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

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

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

          stable/update params for views (COUCHDB-3063)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1abce385cd813de9539af8c8d906f855f62ae5a5 in couchdb's branch refs/heads/master from Robert Newson [ https://git-wip-us.apache.org/repos/asf?p=couchdb.git;h=1abce38 ] stable/update params for views ( COUCHDB-3063 )
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user iilyak opened a pull request:

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

          converge #mrargs{} record

          Upgrade/downgrade #mrargs{} record as needed.

          Depends on:

          COUCHDB-3063

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

          $ git pull https://github.com/cloudant/couchdb-fabric 77984-upgrade-mrargs-record

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

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


          commit 691266df77cda0f60934a76d1f8163f2c0308544
          Author: ILYA Khlopotov <iilyak@apache.org>
          Date: 2016-11-11T23:28:37Z

          converge #mrargs{} record

          Upgrade/downgrade #mrargs{} record as needed.

          COUCHDB-3063


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user iilyak opened a pull request: https://github.com/apache/couchdb-fabric/pull/75 converge #mrargs{} record Upgrade/downgrade #mrargs{} record as needed. Depends on: https://github.com/apache/couchdb-couch-mrview/pull/60 https://github.com/apache/couchdb-couch/pull/212 COUCHDB-3063 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-fabric 77984-upgrade-mrargs-record Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-fabric/pull/75.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 #75 commit 691266df77cda0f60934a76d1f8163f2c0308544 Author: ILYA Khlopotov <iilyak@apache.org> Date: 2016-11-11T23:28:37Z converge #mrargs{} record Upgrade/downgrade #mrargs{} record as needed. COUCHDB-3063
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user iilyak closed the pull request at:

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

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

          Github user iilyak closed the pull request at:

          https://github.com/apache/couchdb-couch-mrview/pull/60

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

            People

            • Assignee:
              Unassigned
              Reporter:
              banjiewen Benjamin Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development