Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A9E3D626 for ; Wed, 14 Nov 2012 10:07:49 +0000 (UTC) Received: (qmail 54528 invoked by uid 500); 14 Nov 2012 10:07:49 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 54393 invoked by uid 500); 14 Nov 2012 10:07:48 -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 54360 invoked by uid 99); 14 Nov 2012 10:07:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2012 10:07:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id BF86655ED1; Wed, 14 Nov 2012 10:07:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rnewson@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: Use local UUID instead of local host:port Message-Id: <20121114100746.BF86655ED1@tyr.zones.apache.org> Date: Wed, 14 Nov 2012 10:07:46 +0000 (UTC) Updated Branches: refs/heads/1259-stable_replication_ids fd96a01d0 -> 39fe99825 (forced update) Use local UUID instead of local host:port Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/39fe9982 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/39fe9982 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/39fe9982 Branch: refs/heads/1259-stable_replication_ids Commit: 39fe998257a5f29b264c7632c75c2aafc6da5892 Parents: da7636f Author: Robert Newson Authored: Wed Nov 14 09:59:50 2012 +0000 Committer: Robert Newson Committed: Wed Nov 14 09:59:50 2012 +0000 ---------------------------------------------------------------------- src/couch_replicator/src/couch_replicator.hrl | 2 +- .../src/couch_replicator_utils.erl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/39fe9982/src/couch_replicator/src/couch_replicator.hrl ---------------------------------------------------------------------- diff --git a/src/couch_replicator/src/couch_replicator.hrl b/src/couch_replicator/src/couch_replicator.hrl index 20c0bc3..018aa4b 100644 --- a/src/couch_replicator/src/couch_replicator.hrl +++ b/src/couch_replicator/src/couch_replicator.hrl @@ -10,7 +10,7 @@ % License for the specific language governing permissions and limitations under % the License. --define(REP_ID_VERSION, 2). +-define(REP_ID_VERSION, 3). -record(rep, { id, http://git-wip-us.apache.org/repos/asf/couchdb/blob/39fe9982/src/couch_replicator/src/couch_replicator_utils.erl ---------------------------------------------------------------------- diff --git a/src/couch_replicator/src/couch_replicator_utils.erl b/src/couch_replicator/src/couch_replicator_utils.erl index 4679321..d7778db 100644 --- a/src/couch_replicator/src/couch_replicator_utils.erl +++ b/src/couch_replicator/src/couch_replicator_utils.erl @@ -59,6 +59,12 @@ replication_id(#rep{options = Options} = Rep) -> % If a change is made to how replications are identified, % please add a new clause and increase ?REP_ID_VERSION. +replication_id(#rep{user_ctx = UserCtx} = Rep, 3) -> + UUID = couch_server:get_uuid(), + Src = get_rep_endpoint(UserCtx, Rep#rep.source), + Tgt = get_rep_endpoint(UserCtx, Rep#rep.target), + maybe_append_filters([UUID, Src, Tgt], Rep); + replication_id(#rep{user_ctx = UserCtx} = Rep, 2) -> {ok, HostName} = inet:gethostname(), Port = case (catch mochiweb_socket_server:get(couch_httpd, port)) of