basho / riak_repl

Riak DC Replication
Apache License 2.0
56 stars 32 forks source link

riak-repl status Output Command Line vs Web Service Discrepancy [JIRA: RIAK-1775] #672

Open jenafermiller opened 9 years ago

jenafermiller commented 9 years ago

When running the riak-repl status from the web service the list of source_stats objects is getting truncated and only the last item in the list is getting displayed. Thus, if there is more than one source_stats connection the output of a riak-repl status command is different when run on the command line (full output shown) vs the web service (truncated output).

To reproduce the web service bug:

The output of that command looks something like this:

,"sources": {"source_stats":{"pid":"<0.22828.0>","message_queue_len":0,"rt_source_connected_to":{"source":"node3","pid":"<0.22828.0>","connected":true,"transport":"ranch_tcp","socket":{"peername":"172.17.22.131:9080","sockname":"172.17.22.129:42904","recv_avg":"[13, 13, 13, 14, 14, 15, 16]","recv_cnt":"[0, 1, 1, 0, 1, 1]","recv_dvi":"[15, 15, 16, 16, 16, 17, 17]","recv_kbps":"[0, 0, 0, 0, 0, 0]","recv_max":"[85, 85, 85, 85, 85, 85, 85]","send_cnt":"[0, 1, 1, 0, 1, 1]","send_kbps":"[0, 0, 0, 0, 0, 0]","send_pend":"[0, 0, 0, 0, 0, 0, 0]"},"helper_pid":"<0.22830.0>","hb_rtt":0,"sent_seq":10,"objects":1}}, "source_stats":{"pid":"<0.15672.0>","message_queue_len":0,"rt_source_connected_to":{"source":"node2","pid":"<0.15672.0>","connected":false}}}

You can see that the sources element is an object and that the object contains two elements. However, seeing as both elements have the name source_stats the data from the first element is being lost as the two are being collapsed into a single element that contains only the contents of the last source_stats.

jonmeredith commented 9 years ago

Thanks Jena - that matched my diagnosis. I have the start of a branch to fix it, but will require a change to the format to fix.

This applies to both sources and sinks for realtime, fullsync and proxygets.

bsparrow435 commented 9 years ago

The customer has inquired about when this will be fixed. Just pinging the issue for posterity.