Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Can pipeline have unwanted results? #42

Closed
jodinathan opened this issue Aug 10, 2021 · 2 comments
Closed

Can pipeline have unwanted results? #42

jodinathan opened this issue Aug 10, 2021 · 2 comments
Labels
question Further information is requested

Comments

@jodinathan
Copy link

I was digging through the pipline feature in the lib and I am wondering if it can lead to weird behavior?

It sets _pipeline to true and then the subsequent command calls are stored and only executed when calling flush, however, can't it also store command calls from other parts of the code?

If we have two places in the code using the same client and one is using pipeline and other isn't, if they run at same time, wouldn't the commands that aren't supposed to be in pipeline also be executed in the pipeline because of the pipeline call?

Is this expected?
Should I create another client just for pipelining purposes?
I am not an expert in Redis and this is my first time using pipeline, so I wouldn't know.

@jcmellado
Copy link
Owner

That's the expected behavior, you should not use the same connection with different purposes without expecting unwanted results.

@jcmellado jcmellado added the question Further information is requested label Aug 10, 2021
@jodinathan
Copy link
Author

okay

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants