ioredis icon indicating copy to clipboard operation
ioredis copied to clipboard

Data writing to wrong db after some time

Open zaidiqbal opened this issue 1 year ago • 2 comments

Hi,

I have 2 dbs, db0, db1. I use only db0. What happens is that data is correctly entered into db0 and after some time the data starts being writing to db1 without any clear reason.

I have manually added db: 0, during connection to remove the probability of mistakenly connecting to db1, but still it writes data to db: 1 after some time.

I am using ioredis version 5.3.1, your help is appreciated, thanks

zaidiqbal avatar May 15 '24 11:05 zaidiqbal

are you using the SELECT command at any point (i.e calling client.select or client.call('SELECT'))?

leibale avatar May 15 '24 18:05 leibale

no, I just use methods like sadd, smembers etc

zaidiqbal avatar May 15 '24 18:05 zaidiqbal

are you using the SELECT command at any point (i.e calling client.select or client.call('SELECT'))?

It was actually this issue, somewhere in the code the select statement was hidden, thanks, it is working fine now.

zaidiqbal avatar May 16 '24 17:05 zaidiqbal

:)

leibale avatar May 16 '24 18:05 leibale