Skip to content

Commit

Permalink
Log replication req # to track replication progress.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmundkur authored and srobertson committed Oct 7, 2012
1 parent 55df9d2 commit d90e299
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions master/src/ddfs/ddfs_gc_main.erl
Expand Up @@ -1127,21 +1127,26 @@ wait_put_blob(#rep_state{ref = Ref, timeouts = TO, master = Master} = S,
SrcNode, PutUrl) ->
receive
{Ref, _B, _PU, {ok, BlobName, NewUrls}} ->
lager:info("GC: replicated ~p (~p) to ~p", [BlobName, Ref, NewUrls]),
add_replicas(Master, BlobName, NewUrls),
S;
{Ref, B, PU, E} ->
lager:info("GC: error replicating ~p to ~p: ~p", [B, PU, E]),
lager:info("GC: error replicating ~p (~p) to ~p: ~p",
[B, Ref, PU, E]),
S;
{_OldRef, _B, PU, {ok, BlobName, NewUrls}} ->
{OldRef, _B, PU, {ok, BlobName, NewUrls}} ->
% Delayed response.
lager:info("GC: delayed replication of ~p to ~p: ~p", [BlobName, PU, NewUrls]),
lager:info("GC: delayed replication of ~p (~p/~p) to ~p: ~p",
[BlobName, OldRef, Ref, PU, NewUrls]),
add_replicas(Master, BlobName, NewUrls),
wait_put_blob(S#rep_state{timeouts = TO - 1}, SrcNode, PutUrl);
{_OldRef, B, PU, OldResult} ->
lager:info("GC: error replicating ~p to ~p: ~p", [B, PU, OldResult]),
{OldRef, B, PU, OldResult} ->
lager:info("GC: error replicating ~p (~p/~p) to ~p: ~p",
[B, OldRef, Ref, PU, OldResult]),
wait_put_blob(S#rep_state{timeouts = TO - 1}, SrcNode, PutUrl)
after ?GC_PUT_TIMEOUT ->
lager:info("GC: replication timeout on ~p for ~p", [SrcNode, PutUrl]),
lager:info("GC: replication timeout on ~p (~p) for ~p",
[SrcNode, Ref, PutUrl]),
S#rep_state{timeouts = TO + 1}
end.

Expand Down

0 comments on commit d90e299

Please sign in to comment.