{"action":"created","issue":{"url":"https://api.github.com/repos/go-redis/redis/issues/240","labels_url":"https://api.github.com/repos/go-redis/redis/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/go-redis/redis/issues/240/comments","events_url":"https://api.github.com/repos/go-redis/redis/issues/240/events","html_url":"https://github.com/go-redis/redis/issues/240","id":125673096,"number":240,"title":"Cluster commands like FlushAll and Keys only contact one node.","user":{"login":"jaffee","id":926067,"avatar_url":"https://avatars.githubusercontent.com/u/926067?v=3","gravatar_id":"","url":"https://api.github.com/users/jaffee","html_url":"https://github.com/jaffee","followers_url":"https://api.github.com/users/jaffee/followers","following_url":"https://api.github.com/users/jaffee/following{/other_user}","gists_url":"https://api.github.com/users/jaffee/gists{/gist_id}","starred_url":"https://api.github.com/users/jaffee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaffee/subscriptions","organizations_url":"https://api.github.com/users/jaffee/orgs","repos_url":"https://api.github.com/users/jaffee/repos","events_url":"https://api.github.com/users/jaffee/events{/privacy}","received_events_url":"https://api.github.com/users/jaffee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-08T19:06:32Z","updated_at":"2016-01-08T21:24:46Z","closed_at":null,"body":"```\r\ncli := redis.NewClusterClient(&redis.ClusterOptions{\r\n\tAddrs: []string{\"localhost:55400\", \"localhost:55401\", \"localhost:55402\"},\r\n})\r\n// add data to a variety of keys\r\n// ...\r\n// now try flushing\r\ncli.FlushAll().Result()\r\n// only some keys will have been deleted because hashSlot just picks a random slot\r\n```\r\n\r\nI have a bit of code that fixes this (for FLUSHALL at least), but I wanted to make sure I'm not missing the right way to do this before I invest any more time in that."},"comment":{"url":"https://api.github.com/repos/go-redis/redis/issues/comments/170128340","html_url":"https://github.com/go-redis/redis/issues/240#issuecomment-170128340","issue_url":"https://api.github.com/repos/go-redis/redis/issues/240","id":170128340,"user":{"login":"jaffee","id":926067,"avatar_url":"https://avatars.githubusercontent.com/u/926067?v=3","gravatar_id":"","url":"https://api.github.com/users/jaffee","html_url":"https://github.com/jaffee","followers_url":"https://api.github.com/users/jaffee/followers","following_url":"https://api.github.com/users/jaffee/following{/other_user}","gists_url":"https://api.github.com/users/jaffee/gists{/gist_id}","starred_url":"https://api.github.com/users/jaffee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaffee/subscriptions","organizations_url":"https://api.github.com/users/jaffee/orgs","repos_url":"https://api.github.com/users/jaffee/repos","events_url":"https://api.github.com/users/jaffee/events{/privacy}","received_events_url":"https://api.github.com/users/jaffee/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T21:24:46Z","updated_at":"2016-01-08T21:24:46Z","body":"Well, they're definitely useful commands to have IMO. Maybe a separate process method on ClusterClient for commands that need to talk to every node in the cluster? It looks like there are other clients (https://github.com/Grokzen/redis-py-cluster at least) that do this.\r\n\r\nI'd be happy to take a stab at it if y'all are interested in having this functionality."}}