Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReplicaTopologyProvider can't parse replicas from INFO #2375

Closed
IlyaShatskikh opened this issue Mar 31, 2023 · 1 comment
Closed

ReplicaTopologyProvider can't parse replicas from INFO #2375

IlyaShatskikh opened this issue Mar 31, 2023 · 1 comment
Labels
type: feature A new feature
Milestone

Comments

@IlyaShatskikh
Copy link

Bug Report

ReplicaTopologyProvider can't parse replicas from the info command response.

Current Behavior

Install Redis Master/Replica from Bitnami Helm Chart.

kubectl get pod,svc,statefulset
NAME                         READY   STATUS    RESTARTS   AGE
pod/redis-chart-master-0     1/1     Running   0          56m
pod/redis-chart-replicas-0   1/1     Running   0          56m
pod/redis-chart-replicas-1   1/1     Running   0          53m
pod/redis-client             1/1     Running   0          13m

NAME                           TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
service/kubernetes             ClusterIP   10.96.0.1        <none>        443/TCP    57m
service/redis-chart-headless   ClusterIP   None             <none>        6379/TCP   56m
service/redis-chart-master     ClusterIP   10.111.112.156   <none>        6379/TCP   56m
service/redis-chart-replicas   ClusterIP   10.97.3.0        <none>        6379/TCP   56m

NAME                                    READY   AGE
statefulset.apps/redis-chart-master     1/1     56m
statefulset.apps/redis-chart-replicas   2/2     56m

I expect lettuce to connect to Master and Replicas to be read from the INFO command.

# Replication
role:master
connected_slaves:2
slave0:ip=redischartreplicas-0.,port=6379,state=online,offset=3675,lag=0
slave1:ip=redis-chart-replicas-1.,port=6379,state=online,offset=3675,lag=0
master_failover_state:no-failover
master_replid:9b5d528bf6aaf92a3e458b0f956c4310fd4bbf9f
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:3675
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:3675

In ReplicaTopologyProvider.java:137 SLAVE_PATTERN can't match slave because of the name in IP.

Expected behavior/code

Slaves to be parsed as is.

Environment

  • Lettuce version(s): 6.1.10.RELEASE
  • Redis version: 7.0.10

Possible Solution

Change SLAVE_PATTERN and IP_PATTERN

@mp911de
Copy link
Collaborator

mp911de commented Apr 18, 2023

Feel free to submit a pull request.

@mp911de mp911de added type: feature A new feature status: help-wanted An issue that a contributor can help us with labels Apr 18, 2023
@mp911de mp911de removed the status: help-wanted An issue that a contributor can help us with label Apr 24, 2023
@mp911de mp911de added this to the 6.2.5.RELEASE milestone Apr 24, 2023
mp911de pushed a commit that referenced this issue Apr 24, 2023
@mp911de mp911de closed this as completed Apr 24, 2023
mp911de pushed a commit that referenced this issue Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants