{"action":"created","issue":{"url":"https://api.github.com/repos/tarantool/tarantool/issues/723","labels_url":"https://api.github.com/repos/tarantool/tarantool/issues/723/labels{/name}","comments_url":"https://api.github.com/repos/tarantool/tarantool/issues/723/comments","events_url":"https://api.github.com/repos/tarantool/tarantool/issues/723/events","html_url":"https://github.com/tarantool/tarantool/issues/723","id":57593766,"number":723,"title":"display state of connected replicas on a master","user":{"login":"kostja","id":482910,"avatar_url":"https://avatars.githubusercontent.com/u/482910?v=3","gravatar_id":"","url":"https://api.github.com/users/kostja","html_url":"https://github.com/kostja","followers_url":"https://api.github.com/users/kostja/followers","following_url":"https://api.github.com/users/kostja/following{/other_user}","gists_url":"https://api.github.com/users/kostja/gists{/gist_id}","starred_url":"https://api.github.com/users/kostja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kostja/subscriptions","organizations_url":"https://api.github.com/users/kostja/orgs","repos_url":"https://api.github.com/users/kostja/repos","events_url":"https://api.github.com/users/kostja/events{/privacy}","received_events_url":"https://api.github.com/users/kostja/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tarantool/tarantool/labels/customer","name":"customer","color":"bfdadc"},{"url":"https://api.github.com/repos/tarantool/tarantool/labels/feature","name":"feature","color":"bfe5bf"},{"url":"https://api.github.com/repos/tarantool/tarantool/labels/review","name":"review","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"rtsisyk","id":1799054,"avatar_url":"https://avatars.githubusercontent.com/u/1799054?v=3","gravatar_id":"","url":"https://api.github.com/users/rtsisyk","html_url":"https://github.com/rtsisyk","followers_url":"https://api.github.com/users/rtsisyk/followers","following_url":"https://api.github.com/users/rtsisyk/following{/other_user}","gists_url":"https://api.github.com/users/rtsisyk/gists{/gist_id}","starred_url":"https://api.github.com/users/rtsisyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtsisyk/subscriptions","organizations_url":"https://api.github.com/users/rtsisyk/orgs","repos_url":"https://api.github.com/users/rtsisyk/repos","events_url":"https://api.github.com/users/rtsisyk/events{/privacy}","received_events_url":"https://api.github.com/users/rtsisyk/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/tarantool/tarantool/milestones/9","html_url":"https://github.com/tarantool/tarantool/milestones/1.6.6","labels_url":"https://api.github.com/repos/tarantool/tarantool/milestones/9/labels","id":726922,"number":9,"title":"1.6.6","description":"Gamma","creator":{"login":"kostja","id":482910,"avatar_url":"https://avatars.githubusercontent.com/u/482910?v=3","gravatar_id":"","url":"https://api.github.com/users/kostja","html_url":"https://github.com/kostja","followers_url":"https://api.github.com/users/kostja/followers","following_url":"https://api.github.com/users/kostja/following{/other_user}","gists_url":"https://api.github.com/users/kostja/gists{/gist_id}","starred_url":"https://api.github.com/users/kostja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kostja/subscriptions","organizations_url":"https://api.github.com/users/kostja/orgs","repos_url":"https://api.github.com/users/kostja/repos","events_url":"https://api.github.com/users/kostja/events{/privacy}","received_events_url":"https://api.github.com/users/kostja/received_events","type":"User","site_admin":false},"open_issues":53,"closed_issues":78,"state":"open","created_at":"2014-07-21T09:38:49Z","updated_at":"2015-08-14T12:13:56Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-02-13T12:34:16Z","updated_at":"2015-08-14T22:21:30Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/tarantool/tarantool/issues/comments/131254723","html_url":"https://github.com/tarantool/tarantool/issues/723#issuecomment-131254723","issue_url":"https://api.github.com/repos/tarantool/tarantool/issues/723","id":131254723,"user":{"login":"kostja","id":482910,"avatar_url":"https://avatars.githubusercontent.com/u/482910?v=3","gravatar_id":"","url":"https://api.github.com/users/kostja","html_url":"https://github.com/kostja","followers_url":"https://api.github.com/users/kostja/followers","following_url":"https://api.github.com/users/kostja/following{/other_user}","gists_url":"https://api.github.com/users/kostja/gists{/gist_id}","starred_url":"https://api.github.com/users/kostja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kostja/subscriptions","organizations_url":"https://api.github.com/users/kostja/orgs","repos_url":"https://api.github.com/users/kostja/repos","events_url":"https://api.github.com/users/kostja/events{/privacy}","received_events_url":"https://api.github.com/users/kostja/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T22:21:30Z","updated_at":"2015-08-14T22:21:30Z","body":"Now, this patch, unfortunately, needs to be re-done. The feature request wasn't specified  well enough.\r\nWe need to look around and see what others do too, before coming back to this.\r\n\r\nFirst of all, the user needs to see a single entry for a single node. I.e. if we have both a relay and a remote in a master-master setting, we need to display only 1 entry in replication status table.\r\n\r\nSecond, in case of multi-source, we need to find a way to index the output A quick index is needed so that we can display state of 1 replica only, without building an entire table. Apparently we need to index it with server ids (short ones). Perhaps we need to enforce human-readable names on nodes, and index the table using these names.\r\n\r\nFinally, we need to find a way to merge information from outgoing vclock (remote->vlcock) and incoming vclock (relay->vclock), as well as from outgoing lag and incoming lag into few comprehensible metrics. \r\nHow much is the remote behind and how much are we behind? We have the following data:\r\n- the time when we sent the last row to remote (idle1)\r\n- the time when we received last row from remote (idle2)\r\n- the timestamp of the last row received\r\n- the timestamp of the last row sent.\r\n\r\nCan we assume that link speed is uniform, and merge two idle times and two lag times and display the min (idle1, idle2) as idle, and min(lag1, lag2) as lag? I think we need to find a way to do it, since that's what the user is interested in. Making sense of two idle and two lag times is difficult even to us, not to mention users. \r\n\r\nFinally, we need to find a way to merge vclocks. We actually have 3 vclocks to sync: recovery->vclock, remote->vclock, relay->vclock. In a totally synchronous system, all vclocks are identical. So, if they are not, the difference tells us about events which have not reached the other side yet. So, perhaps we need to print a single vclock in the following form:\r\n\r\n{ 1: 32 (+3), 2: 33 (-3) }, showing how much the master is ahead or behind the replica.\r\n\r\nLast thing, we need to replace socket address with uri from the configuration file. Addresses and ports are useful, but take a lot of display space, and are perhaps useful for debugging, but not at all handy if one just needs to monitor replciation and do health checks. "}}