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 PSUBSCRIBE #3140

Open
tishun opened this issue Jan 24, 2025 · 1 comment
Open

Discovery service does not support PSUBSCRIBE #3140

tishun opened this issue Jan 24, 2025 · 1 comment
Labels
type: improvement An improvement to the existing implementation

Comments

@tishun
Copy link
Collaborator

tishun commented Jan 24, 2025

Feature Request

When connecting to the Discovery Service the driver attempts to subscribe for topology updates

Is your feature request related to a problem? Please describe

SERVER:8001> PSUBSCRIBE
(error) ERR unknown command
Exception in thread "main" io.lettuce.core.RedisConnectionException: Unable to connect to redis-sentinel://SERVER:8001?sentinelMasterId=MASTERID
	at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)
	at io.lettuce.core.masterreplica.MasterReplica.getConnection(MasterReplica.java:261)
	at io.lettuce.core.masterreplica.MasterReplica.connect(MasterReplica.java:113)
	at acme.lettuce.SentinelDeployment.main(SentinelDeployment.java:28)
Caused by: io.lettuce.core.RedisException: Cannot attach to Redis Sentinel for topology refresh
	at io.lettuce.core.masterreplica.SentinelTopologyRefreshConnections.onEmit(SentinelTopologyRefreshConnections.java:59)
	Suppressed: The stacktrace has been enhanced by Reactor, refer to additional information below: 
Assembly trace from producer [reactor.core.publisher.MonoCompletionStage] :
	reactor.core.publisher.Mono.fromCompletionStage(Mono.java:543)
	io.lettuce.core.masterreplica.SentinelConnector.initializeConnection(SentinelConnector.java:100)
Error has been observed at the following site(s):
	*__Mono.fromCompletionStageat io.lettuce.core.masterreplica.SentinelConnector.initializeConnection(SentinelConnector.java:100)
	|_       Mono.onErrorResumeat io.lettuce.core.masterreplica.SentinelConnector.initializeConnection(SentinelConnector.java:100)
	*_________________Mono.thenat io.lettuce.core.masterreplica.ResumeAfter.thenError(ResumeAfter.java:78)
	|_           Mono.doFinallyat io.lettuce.core.masterreplica.ResumeAfter.thenError(ResumeAfter.java:78)
	*_________________Mono.thenat io.lettuce.core.masterreplica.SentinelConnector.initializeConnection(SentinelConnector.java:102)
	*______________Mono.flatMapat io.lettuce.core.masterreplica.SentinelConnector.connectAsync(SentinelConnector.java:69)
	|_          Mono.onErrorMapat io.lettuce.core.masterreplica.SentinelConnector.connectAsync(SentinelConnector.java:76)
Original Stack Trace:
		at io.lettuce.core.masterreplica.SentinelTopologyRefreshConnections.onEmit(SentinelTopologyRefreshConnections.java:59)
		at io.lettuce.core.masterreplica.CompletableEventLatchSupport.emit(CompletableEventLatchSupport.java:120)
		at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
		at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:153)
		at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
		at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
		at java.base/java.lang.Thread.run(Thread.java:1583)

Describe the solution you'd like

The driver should handle DiscoveryService connections

@tishun tishun added the type: improvement An improvement to the existing implementation label Feb 8, 2025
@tishun
Copy link
Collaborator Author

tishun commented Feb 14, 2025

See also #1168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement An improvement to the existing implementation
Projects
None yet
Development

No branches or pull requests

1 participant