Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add destination node to the name of the TAP stream.

Change-Id: I3d44798d804845009866eaab89c2d6564b2cb206
Reviewed-on: http://review.membase.org/4712
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information...
commit bf0ca238dca87afc339d68d09dcd295c41baeaa3 1 parent a8065c3
sfrogner sfrogner authored alk committed

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +5 5 src/ns_vbm_sup.erl
10 src/ns_vbm_sup.erl
@@ -205,7 +205,7 @@ args(Node, Bucket, VBuckets, DstNode, TakeOver) ->
205 205 false -> []
206 206 end,
207 207 {User, Pass} = ns_bucket:credentials(Bucket),
208   - Name = unique_name(case TakeOver of true -> "t-"; false -> "r-" end),
  208 + Name = unique_name(case TakeOver of true -> "t"; false -> "r" end, DstNode),
209 209 OtherArgs = ["-e", "-a", User,
210 210 "-h", ns_memcached:host_port_str(Node),
211 211 "-d", ns_memcached:host_port_str(DstNode),
@@ -276,8 +276,8 @@ start_replicas(SrcNode, Bucket, VBuckets, DstNode) ->
276 276
277 277
278 278 %% @doc Generate a unique name with a given prefix that's valid for a TAP queue.
279   -unique_name(Prefix) ->
  279 +unique_name(Prefix, DstNode) ->
280 280 {MegaSecs, Secs, MicroSecs} = now(),
281   - lists:flatten(io_lib:format("~s~s-~B.~6.10.0B",
282   - [Prefix, node(), MegaSecs * 1000000 + Secs,
283   - MicroSecs])).
  281 + lists:flatten(io_lib:format("~s-~s-~s-~B.~6.10.0B",
  282 + [Prefix, DstNode, node(),
  283 + MegaSecs * 1000000 + Secs, MicroSecs])).

0 comments on commit bf0ca23

Please sign in to comment.
Something went wrong with that request. Please try again.