couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: git commit: Use local UUID instead of local host:port
Date Wed, 14 Nov 2012 11:01:01 GMT
+1 for 1.3

On Wed, Nov 14, 2012 at 11:07 AM,  <rnewson@apache.org> wrote:
> 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 <rnewson@apache.org>
> Authored: Wed Nov 14 09:59:50 2012 +0000
> Committer: Robert Newson <rnewson@apache.org>
> 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
>

Mime
View raw message