Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6C72F200CED for ; Fri, 4 Aug 2017 00:07:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6906D16CA6F; Thu, 3 Aug 2017 22:07:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AE8DC16CA6D for ; Fri, 4 Aug 2017 00:07:23 +0200 (CEST) Received: (qmail 34765 invoked by uid 500); 3 Aug 2017 22:07:22 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 34756 invoked by uid 99); 3 Aug 2017 22:07:22 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2017 22:07:22 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8D04081652; Thu, 3 Aug 2017 22:07:21 +0000 (UTC) Date: Thu, 03 Aug 2017 22:07:21 +0000 To: "commits@couchdb.apache.org" Subject: [couchdb] branch master updated: Allow replicator application to always update replicator docs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <150179804106.2123.16836702272405599358@gitbox.apache.org> From: vatamane@apache.org Reply-To: "commits@couchdb.apache.org" X-Git-Host: gitbox.apache.org X-Git-Repo: couchdb X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 408096f5537793a057bdcf2a1db01aee9c3f74dd X-Git-Newrev: 1ba42081779dfea2d4d09af00744ab4667ffd941 X-Git-Rev: 1ba42081779dfea2d4d09af00744ab4667ffd941 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Thu, 03 Aug 2017 22:07:24 -0000 This is an automated email from the ASF dual-hosted git repository. vatamane pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/couchdb.git The following commit(s) were added to refs/heads/master by this push: new 1ba4208 Allow replicator application to always update replicator docs 1ba4208 is described below commit 1ba42081779dfea2d4d09af00744ab4667ffd941 Author: Nick Vatamaniuc AuthorDate: Thu Aug 3 17:42:24 2017 -0400 Allow replicator application to always update replicator docs Previously when updating the document with the error or failed states the document body will not pass the validation function and will consequently crash either the scheduler or the doc processor. --- src/couch_replicator/src/couch_replicator_js_functions.hrl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/couch_replicator/src/couch_replicator_js_functions.hrl b/src/couch_replicator/src/couch_replicator_js_functions.hrl index 9b11e8a..d410433 100644 --- a/src/couch_replicator/src/couch_replicator_js_functions.hrl +++ b/src/couch_replicator/src/couch_replicator_js_functions.hrl @@ -53,6 +53,11 @@ var isReplicator = (userCtx.roles.indexOf('_replicator') >= 0); var isAdmin = (userCtx.roles.indexOf('_admin') >= 0); + if (isReplicator) { + // Always let replicator update the replication document + return; + } + if (newDoc._replication_state === 'failed') { // Skip validation in case when we update the document with the // failed state. In this case it might be malformed. However, -- To stop receiving notification emails like this one, please contact ['"commits@couchdb.apache.org" '].