{"action":"created","issue":{"url":"https://api.github.com/repos/redisson/redisson/issues/1768","repository_url":"https://api.github.com/repos/redisson/redisson","labels_url":"https://api.github.com/repos/redisson/redisson/issues/1768/labels{/name}","comments_url":"https://api.github.com/repos/redisson/redisson/issues/1768/comments","events_url":"https://api.github.com/repos/redisson/redisson/issues/1768/events","html_url":"https://github.com/redisson/redisson/issues/1768","id":386353990,"node_id":"MDU6SXNzdWUzODYzNTM5OTA=","number":1768,"title":"Problem with radius() method and AWS ElastiCache cluster and readMode=SLAVE","user":{"login":"duribe76","id":4105457,"node_id":"MDQ6VXNlcjQxMDU0NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/4105457?v=4","gravatar_id":"","url":"https://api.github.com/users/duribe76","html_url":"https://github.com/duribe76","followers_url":"https://api.github.com/users/duribe76/followers","following_url":"https://api.github.com/users/duribe76/following{/other_user}","gists_url":"https://api.github.com/users/duribe76/gists{/gist_id}","starred_url":"https://api.github.com/users/duribe76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duribe76/subscriptions","organizations_url":"https://api.github.com/users/duribe76/orgs","repos_url":"https://api.github.com/users/duribe76/repos","events_url":"https://api.github.com/users/duribe76/events{/privacy}","received_events_url":"https://api.github.com/users/duribe76/received_events","type":"User","site_admin":false},"labels":[{"id":74467160,"node_id":"MDU6TGFiZWw3NDQ2NzE2MA==","url":"https://api.github.com/repos/redisson/redisson/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/redisson/redisson/milestones/87","html_url":"https://github.com/redisson/redisson/milestone/87","labels_url":"https://api.github.com/repos/redisson/redisson/milestones/87/labels","id":3827658,"node_id":"MDk6TWlsZXN0b25lMzgyNzY1OA==","number":87,"title":"2.15.0","description":"","creator":{"login":"mrniko","id":1104661,"node_id":"MDQ6VXNlcjExMDQ2NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/1104661?v=4","gravatar_id":"","url":"https://api.github.com/users/mrniko","html_url":"https://github.com/mrniko","followers_url":"https://api.github.com/users/mrniko/followers","following_url":"https://api.github.com/users/mrniko/following{/other_user}","gists_url":"https://api.github.com/users/mrniko/gists{/gist_id}","starred_url":"https://api.github.com/users/mrniko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrniko/subscriptions","organizations_url":"https://api.github.com/users/mrniko/orgs","repos_url":"https://api.github.com/users/mrniko/repos","events_url":"https://api.github.com/users/mrniko/events{/privacy}","received_events_url":"https://api.github.com/users/mrniko/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":14,"state":"open","created_at":"2018-11-16T20:26:03Z","updated_at":"2018-12-13T11:54:38Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-11-30T21:19:51Z","updated_at":"2018-12-13T14:42:57Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\nA call to retrieve the items from a RGeo key based on radius should work in an AWS ElastiCache replicated setup using readMode SLAVE\r\n\r\n### Actual behavior\r\nSince all these calls are considered read-only by Redisson as opposed to write by Redis/ElastiCache, they are all sent to read-only slaves. We get the exception below instead. Please note I've masked actual IP addresses and host names with x's, and replaced the key names and coordinates.\r\nREADONLY You can't write against a read only slave.. channel: [id: 0xad662a07, L:/xx.x.x.230:46140 - R:xxx-01.xxx.0001.use1.cache.amazonaws.com/xx.x.xx.xxx:6379] command: (GEORADIUS), params: [{geo}geoKey:coords, -100.000000, 30.000000, 50.0, mi, ASC]\r\n\r\n### Steps to reproduce or test case\r\nConfigure Redisson to use a replicated ElastiCache cluster with readMode=SLAVE and use radius() method for a RGeo object\r\n\r\n### Redis version\r\nAWS ElastiCache\r\n\r\n### Redisson version\r\n3.8.1\r\n\r\n### Redisson configuration\r\nIn Code\r\n```\r\nString[] redisNodes = { \"xxx-01.xxx.0001.use1.cache.amazonaws.com:6379\", \"xxx-02.xxx.0001.use1.cache.amazonaws.com:6379\", \"xxx-03.xxx.0001.use1.cache.amazonaws.com:6379\" }\r\nconfig.useReplicatedServers().addNodeAddress(redisNodes);\r\n``` \r\n\r\nIn YAML\r\n```\r\nreplicatedServersConfig:\r\n    idleConnectionTimeout: 10000\r\n    pingTimeout: 1000\r\n    connectTimeout: 10000\r\n    timeout: 3000\r\n    retryAttempts: 3\r\n    retryInterval: 1500\r\n    failedSlaveReconnectionInterval: 3000\r\n    failedSlaveCheckInterval: 60000\r\n    password: null\r\n    subscriptionsPerConnection: 5\r\n    clientName: null\r\n    loadBalancer: !<org.redisson.connection.balancer.RoundRobinLoadBalancer> {}\r\n    subscriptionConnectionMinimumIdleSize: 1\r\n    subscriptionConnectionPoolSize: 50\r\n    slaveConnectionMinimumIdleSize: 10\r\n    slaveConnectionPoolSize: 100\r\n    masterConnectionMinimumIdleSize: 10\r\n    masterConnectionPoolSize: 100\r\n    readMode: \"SLAVE\"\r\n    subscriptionMode: \"MASTER\"\r\n    scanInterval: 1000\r\n    pingConnectionInterval: 0\r\n    keepAlive: false\r\n    tcpNoDelay: false\r\n    dnsMonitoringInterval: 5000\r\nthreads: 0\r\nnettyThreads: 0\r\ncodec: !<org.redisson.codec.SerializationCodec> {}\r\ntransportMode: \"NIO\"\r\n```"},"comment":{"url":"https://api.github.com/repos/redisson/redisson/issues/comments/446992270","html_url":"https://github.com/redisson/redisson/issues/1768#issuecomment-446992270","issue_url":"https://api.github.com/repos/redisson/redisson/issues/1768","id":446992270,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Njk5MjI3MA==","user":{"login":"duribe76","id":4105457,"node_id":"MDQ6VXNlcjQxMDU0NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/4105457?v=4","gravatar_id":"","url":"https://api.github.com/users/duribe76","html_url":"https://github.com/duribe76","followers_url":"https://api.github.com/users/duribe76/followers","following_url":"https://api.github.com/users/duribe76/following{/other_user}","gists_url":"https://api.github.com/users/duribe76/gists{/gist_id}","starred_url":"https://api.github.com/users/duribe76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duribe76/subscriptions","organizations_url":"https://api.github.com/users/duribe76/orgs","repos_url":"https://api.github.com/users/duribe76/repos","events_url":"https://api.github.com/users/duribe76/events{/privacy}","received_events_url":"https://api.github.com/users/duribe76/received_events","type":"User","site_admin":false},"created_at":"2018-12-13T14:42:57Z","updated_at":"2018-12-13T14:42:57Z","author_association":"NONE","body":"> > I think all the radius methods should use the commandExecutor.writeAsync(...) to address this, since the original GEORADIUS command is considered a write operation. Do you have any feedback on that?\r\n> \r\n> I agree. If command is considered as write operation then writeAsync method should be used.\r\n> \r\n> > Would that be okay since there are already so many radius methods?\r\n> \r\n> I think it would be better to replace GEORADIUS to GEORADIUS_RO and GEORADIUSBYMEMBER to GEORADIUSBYMEMBER_RO respectively.\r\n\r\nMy only concern is that moving the current `radius(...)` methods to use GEORADIUS_RO and GEORADIUSBYMEMBER_RO is that it could break compatibility since not all version of Redis have those new commands. Is the latest version of Redisson already requiring Redis 3.2.10+ or 4.0.0+?"}}
{"actor":{"display_login":"duribe76"}}