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

Discovery Service does not support SENTINAL REPLICAS #3130

Open
tishun opened this issue Jan 16, 2025 · 0 comments
Open

Discovery Service does not support SENTINAL REPLICAS #3130

tishun opened this issue Jan 16, 2025 · 0 comments

Comments

@tishun
Copy link
Collaborator

tishun commented Jan 16, 2025

Bug Report

With the introduction of #2144 discovery service connections no longer work as the Discovery service does not support the SENTINEL REPLICAS command

Current Behavior

Connection fails before bing established, because the SentinelTopologyProvider attempts to execute SENTINEL REPLICAS

Stack trace
Caused by: io.lettuce.core.RedisCommandExecutionException: ERR unknown command
	at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)
	at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)
	... 21 common frames omitted```

</details>

#### Input Code
        
<details>
<summary>Input Code</summary>

```java
RedisURI sentinelUri = RedisURI.Builder
                .sentinel(ENV0_SENTINEL, 8001, MASTER_ID)
                .withAuthentication(SENTINEL_USERNAME, SENTNEL_PASSWORD)
                .build();
        RedisClient client = RedisClient.create();

        StatefulRedisMasterReplicaConnection<String, String> connection = MasterReplica.connect(
                client,
                StringCodec.UTF8,
                sentinelUri);

        connection.setReadFrom(ReadFrom.REPLICA);

        connection.sync().get("key");

        connection.close();
        client.shutdown();

Expected behavior/code

Establish connection successfully.

Environment

  • Lettuce version(s): 6.2.x or later
  • Redis version: any
@tishun tishun added the type: bug A general bug label Jan 16, 2025
@tishun tishun changed the title Legacy support for SENTINEL SLAVES Discovery Service does not support SENTINAL REPLICAS Jan 24, 2025
@tishun tishun removed the type: bug A general bug label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant