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

Update all shards with stale=update_after

    Details

    • Type: Story
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Database Core
    • Labels:
      None

      Description

      Stale=update_after should update shards that won't participate in the response due to not being a ushard.

      Discussed with Paul Davis and he suggested the following approach.

      For this ticket we should just need to add a fabric_view:maybe_update_others/3 that we call just after [1,2] with fabric_view:maybe_update_others(DbName, Shards, Args). And then if stable=true and update=(true or lazy) we do mem3:shards(DbName) – ShardsInvolved, and throw a message at them to trigger an update.

      [1] https://github.com/apache/couchdb-fabric/blob/master/src/fabric_view_map.erl#L27
      [2] https://github.com/apache/couchdb-fabric/blob/master/src/fabric_view_reduce.erl#L28

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user brkolla opened a pull request:

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

          Update all shards with stale=update_after

          Trigger an update for all the shards. Will send a message to trigger
          an update to shards that won't participate in the response due to not
          being a ushard.

          COUCHDB-3150

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

          $ git pull https://github.com/cloudant/couchdb-fabric COUCHDB-3150-update-all-shards-stale-update-after

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

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


          commit a336a3c018429e908d70b1ea169cf92a195687ad
          Author: brkolla <bkolla@cloudant.com>
          Date: 2016-09-21T18:29:15Z

          Update all shards with stale=update_after
          Trigger an update for all the shards. Will send a message to trigger
          an update to shards that won't participate in the response due to not
          being a ushard.

          COUCHDB-3150


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user brkolla opened a pull request: https://github.com/apache/couchdb-fabric/pull/70 Update all shards with stale=update_after Trigger an update for all the shards. Will send a message to trigger an update to shards that won't participate in the response due to not being a ushard. COUCHDB-3150 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-fabric COUCHDB-3150 -update-all-shards-stale-update-after Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-fabric/pull/70.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 #70 commit a336a3c018429e908d70b1ea169cf92a195687ad Author: brkolla <bkolla@cloudant.com> Date: 2016-09-21T18:29:15Z Update all shards with stale=update_after Trigger an update for all the shards. Will send a message to trigger an update to shards that won't participate in the response due to not being a ushard. COUCHDB-3150
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user brkolla opened a pull request:

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

          Add new function to get the view index pid.

          Refactored the code to add a new function to return index pid for a
          given view and design document.

          COUCHDB-3150

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

          $ git pull https://github.com/cloudant/couchdb-couch-mrview COUCHDB-3150-add-new-function-to-get-view-index-pid

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

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


          commit 80780c8dee6ec9f14b4aa6a76d72356b7e488c7d
          Author: brkolla <bkolla@cloudant.com>
          Date: 2016-09-21T18:52:57Z

          Add new function to get the view index pid.
          Refactored the code to add a new function to return index pid for a
          given view and design document.

          COUCHDB-3150


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user brkolla opened a pull request: https://github.com/apache/couchdb-couch-mrview/pull/57 Add new function to get the view index pid. Refactored the code to add a new function to return index pid for a given view and design document. COUCHDB-3150 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-couch-mrview COUCHDB-3150 -add-new-function-to-get-view-index-pid Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch-mrview/pull/57.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 #57 commit 80780c8dee6ec9f14b4aa6a76d72356b7e488c7d Author: brkolla <bkolla@cloudant.com> Date: 2016-09-21T18:52:57Z Add new function to get the view index pid. Refactored the code to add a new function to return index pid for a given view and design document. COUCHDB-3150
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit fdaebcf0fd26ed1d402ac6ec6448a8a2b7fbc808 in couchdb-couch-mrview's branch refs/heads/master from brkolla
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=fdaebcf ]

          Add new function to get the view index pid.
          Refactored the code to add a new function to return index pid for a
          given view and design document.

          COUCHDB-3150

          Show
          jira-bot ASF subversion and git services added a comment - Commit fdaebcf0fd26ed1d402ac6ec6448a8a2b7fbc808 in couchdb-couch-mrview's branch refs/heads/master from brkolla [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=fdaebcf ] Add new function to get the view index pid. Refactored the code to add a new function to return index pid for a given view and design document. COUCHDB-3150
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit d27941193516b925959cf3d27db7ba8f6524ba25 in couchdb-couch-mrview's branch refs/heads/master from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=d279411 ]

          Merge remote-tracking branch 'cloudant/COUCHDB-3150-add-new-function-to-get-view-index-pid'

          Show
          jira-bot ASF subversion and git services added a comment - Commit d27941193516b925959cf3d27db7ba8f6524ba25 in couchdb-couch-mrview's branch refs/heads/master from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch-mrview.git;h=d279411 ] Merge remote-tracking branch 'cloudant/ COUCHDB-3150 -add-new-function-to-get-view-index-pid'
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

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

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

          Update all shards with stale=update_after
          Trigger an update for all the shards. Will send a message to trigger
          an update to shards that won't participate in the response due to not
          being a ushard.

          COUCHDB-3150

          Show
          jira-bot ASF subversion and git services added a comment - Commit bea6b00ef5d15ddc5f062a09dacecb1d4d52a6ce in couchdb-fabric's branch refs/heads/master from brkolla [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=bea6b00 ] Update all shards with stale=update_after Trigger an update for all the shards. Will send a message to trigger an update to shards that won't participate in the response due to not being a ushard. COUCHDB-3150
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit ecdcc3dc9740ff0ef820a97276e49a08ce11b696 in couchdb-fabric's branch refs/heads/master from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=ecdcc3d ]

          Merge remote-tracking branch 'cloudant/COUCHDB-3150-update-all-shards-stale-update-after'

          Show
          jira-bot ASF subversion and git services added a comment - Commit ecdcc3dc9740ff0ef820a97276e49a08ce11b696 in couchdb-fabric's branch refs/heads/master from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=ecdcc3d ] Merge remote-tracking branch 'cloudant/ COUCHDB-3150 -update-all-shards-stale-update-after'
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

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

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

          Fix function clause introduced by fix for COUCHDB-3150

          Show
          jira-bot ASF subversion and git services added a comment - Commit d68a00fdeba9113bd1a3dd41d8e546b05bb2e533 in couchdb-fabric's branch refs/heads/master from Robert Newson [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=d68a00f ] Fix function clause introduced by fix for COUCHDB-3150
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user iilyak opened a pull request:

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

          Upgrade/downgrade mrargs record

          This is a fixup commit for COUCHDB-3150.
          The issue appear when we run a mixed cluster when some nodes has old
          version of record and others upgraded already.
          We upgrade mrargs record to include version field to be able to
          distinguish different versions of the record. Which would help us
          going forward.

          COUCHDB-3150

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

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

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

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


          commit 6c6ac782e4b6c64d77fa86b3e4944df06e99c82e
          Author: ILYA Khlopotov <iilyak@apache.org>
          Date: 2016-11-11T22:45:25Z

          Upgrade/downgrade mrargs record

          This is a fixup commit for COUCHDB-3150.
          The issue appear when we run a mixed cluster when some nodes has old
          version of record and others upgraded already.
          We upgrade mrargs record to include version field to be able to
          distinguish different versions of the record. Which would help us
          going forward.

          COUCHDB-3150


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user iilyak opened a pull request: https://github.com/apache/couchdb-couch-mrview/pull/60 Upgrade/downgrade mrargs record This is a fixup commit for COUCHDB-3150 . The issue appear when we run a mixed cluster when some nodes has old version of record and others upgraded already. We upgrade mrargs record to include version field to be able to distinguish different versions of the record. Which would help us going forward. COUCHDB-3150 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-couch-mrview 77984-upgrade-mrargs-record Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch-mrview/pull/60.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 #60 commit 6c6ac782e4b6c64d77fa86b3e4944df06e99c82e Author: ILYA Khlopotov <iilyak@apache.org> Date: 2016-11-11T22:45:25Z Upgrade/downgrade mrargs record This is a fixup commit for COUCHDB-3150 . The issue appear when we run a mixed cluster when some nodes has old version of record and others upgraded already. We upgrade mrargs record to include version field to be able to distinguish different versions of the record. Which would help us going forward. COUCHDB-3150
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user iilyak opened a pull request:

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

          77984 upgrade mrargs record4

          Upgrade `#mrargs{}` record in two steps.

          1. First release would have following
          1. Second release would have

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

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

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

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


          commit a8e0e9549bb2a1181538ae433f1de78abadc41d5
          Author: ILYA Khlopotov <iilyak@apache.org>
          Date: 2016-11-14T21:10:39Z

          Revert "Merge remote-tracking branch 'banjiewen/stale-stable-update'"

          This reverts commit 508122c52731a9eac3e83f8d727f2355f019fe1f, reversing
          changes made to d68a00fdeba9113bd1a3dd41d8e546b05bb2e533.

          commit bed5c67f9633d2837aa51c1aeb078fc671fa1e27
          Author: ILYA Khlopotov <iilyak@apache.org>
          Date: 2016-11-14T21:13:11Z

          Compatibility clause for the record upgrade

          commit 7eabd28ddc81b824e739573cd94796c7fda11450
          Author: ILYA Khlopotov <iilyak@apache.org>
          Date: 2016-11-14T21:17:09Z

          Upgrade #mrargs{} record

          Conflicts:
          src/fabric_util.erl

          commit 5d91018b2fa317198a848c19d60a45dea8091725
          Author: ILYA Khlopotov <iilyak@apache.org>
          Date: 2016-11-14T21:17:12Z

          Revert "Revert "Merge remote-tracking branch 'banjiewen/stale-stable-update'""

          This reverts commit a8e0e9549bb2a1181538ae433f1de78abadc41d5.

          Note: Re-aplying previously reverted merge


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user iilyak opened a pull request: https://github.com/apache/couchdb-fabric/pull/76 77984 upgrade mrargs record4 Upgrade `#mrargs{}` record in two steps. First release would have following fabric [Compatibility clause for the record upgrade] ( https://github.com/apache/couchdb-fabric/commit/ebb43d5452fc20cf26ed616d5076a8d4f38caafc ) mrview [Merge remote-tracking branch 'cloudant/COUCHDB-3150-add-new-function-to-get-view-index-pid'] ( https://github.com/apache/couchdb-couch-mrview/commit/d27941193516b925959cf3d27db7ba8f6524ba25 ) Second release would have fabric [ Revert "Revert "Merge remote-tracking branch 'banjiewen/stale-stable-..]( https://github.com/apache/couchdb-fabric/commit/5d91018b2fa317198a848c19d60a45dea8091725 ) mrview [Merge remote-tracking branch 'banjiewen/stale-stable-update' ] ( https://github.com/apache/couchdb-couch-mrview/commit/d4509606f3aacc4bec94b8936bedf6d1d597ff5f ) You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-fabric 77984-upgrade-mrargs-record4 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-fabric/pull/76.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 #76 commit a8e0e9549bb2a1181538ae433f1de78abadc41d5 Author: ILYA Khlopotov <iilyak@apache.org> Date: 2016-11-14T21:10:39Z Revert "Merge remote-tracking branch 'banjiewen/stale-stable-update'" This reverts commit 508122c52731a9eac3e83f8d727f2355f019fe1f, reversing changes made to d68a00fdeba9113bd1a3dd41d8e546b05bb2e533. commit bed5c67f9633d2837aa51c1aeb078fc671fa1e27 Author: ILYA Khlopotov <iilyak@apache.org> Date: 2016-11-14T21:13:11Z Compatibility clause for the record upgrade commit 7eabd28ddc81b824e739573cd94796c7fda11450 Author: ILYA Khlopotov <iilyak@apache.org> Date: 2016-11-14T21:17:09Z Upgrade #mrargs{} record Conflicts: src/fabric_util.erl commit 5d91018b2fa317198a848c19d60a45dea8091725 Author: ILYA Khlopotov <iilyak@apache.org> Date: 2016-11-14T21:17:12Z Revert "Revert "Merge remote-tracking branch 'banjiewen/stale-stable-update'"" This reverts commit a8e0e9549bb2a1181538ae433f1de78abadc41d5. Note: Re-aplying previously reverted merge
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user iilyak closed the pull request at:

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

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

            People

            • Assignee:
              Unassigned
              Reporter:
              kbkreddy Bala Kolla
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development