You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "david-streamlio (via GitHub)" <gi...@apache.org> on 2026/10/18 16:41:02 UTC

[I] [Bug] Redis sink: non-zero redisDatabase is applied in Cluster mode, where Redis rejects it [pulsar-connectors]

david-streamlio opened a new issue, #142:
URL: https://github.com/apache/pulsar-connectors/issues/142

   ### Motivation
   
   `RedisSession.redisURIs()` calls `withDatabase(config.getRedisDatabase())` on every `RedisURI` regardless of `clientMode`:
   
   `redis/src/main/java/org/apache/pulsar/io/redis/RedisSession.java` (around line 150 on `master`)
   
   Redis Cluster only supports database 0 and rejects `SELECT` with a non-zero index. A user who sets `redisDatabase` to something other than `0` with `clientMode: Cluster` gets a failure at connection time that doesn't point back to the configuration.
   
   This was spotted while looking at #131 and left out of that issue's scope.
   
   ### Goal
   
   - In `validate()`, reject a non-zero `redisDatabase` when `clientMode` is `Cluster`, with a clear message.
   - Optionally, skip `withDatabase()` for cluster URIs entirely, since `0` is the only valid value there.
   - Update the `redisDatabase` `@FieldDoc` to say it applies to `Standalone` mode only.
   
   ### Testing
   
   A `RedisSinkConfigTest` case with `clientMode: Cluster` and `redisDatabase: 1` that checks for the validation error, and one confirming `redisDatabase: 0` in cluster mode still passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Redis sink: non-zero redisDatabase is applied in Cluster mode, where Redis rejects it [pulsar-connectors]

Posted by "Ayush0612005 (via GitHub)" <gi...@apache.org>.
Ayush0612005 commented on issue #142:
URL: https://github.com/apache/pulsar-connectors/issues/142#issuecomment-6265984614

   I'd like to take this one too, as a follow-up to #131 / #145.
   
   Plan: `validate()` rejects a non-zero `redisDatabase` when `clientMode` is `Cluster`, with a clear message. I'll also skip `withDatabase()` for cluster URIs, since `0` is the only valid value there, and update the `redisDatabase` `@FieldDoc` to say it applies to `Standalone` only. Tests: `RedisSinkConfigTest` cases for `Cluster` + `redisDatabase: 1` (rejected) and `Cluster` + `0` (accepted).
   
   Happy to wait for a go-ahead before opening a PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Redis sink: non-zero redisDatabase is applied in Cluster mode, where Redis rejects it [pulsar-connectors]

Posted by "david-streamlio (via GitHub)" <gi...@apache.org>.
david-streamlio closed issue #142: [Bug] Redis sink: non-zero redisDatabase is applied in Cluster mode, where Redis rejects it
URL: https://github.com/apache/pulsar-connectors/issues/142


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org