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

How does txpipeline guarantee transactions? #1602

Closed
TXYH1 opened this issue Jan 17, 2021 · 2 comments
Closed

How does txpipeline guarantee transactions? #1602

TXYH1 opened this issue Jan 17, 2021 · 2 comments

Comments

@TXYH1
Copy link

TXYH1 commented Jan 17, 2021

Hello, I have a question. I can't find the answer anywhere else. Can you help me?

Is txpipeline transactional? In the defaultprocesstxpipeline, cmds is divided into different slices and requests to the service concurrently. Although the commands to be executed for different services are wrapped by multi / exec, how to ensure that all commands are transactional for multiple services? For example, a request to a service failed.

for node, cmds := range cmdsMap {
    ......
    go func(node *clusterNode, cmds []Cmder) {
           ......
	    cn, err := node.Client.getConn()
	    ......
   
	    err = c.txPipelineProcessCmds(node, cn, cmds, failedCmds)
	    node.Client.releaseConnStrict(cn, err)
    }(node, cmds)
    }
@vmihailenco
Copy link
Collaborator

@TXYH1 Redis Cluster does not support distributed transactions. Divided commands are run in different/separate transactions on different Redis Servers.

@TXYH1
Copy link
Author

TXYH1 commented May 22, 2021

@vmihailenco Thank you for your reply. At present, transactions can only be guaranteed on a single node, right

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

2 participants