From a1243c8f5fa99d06ac8b1dcebd36ae1d5ee13023 Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Wed, 11 Dec 2024 20:00:13 +0800 Subject: [PATCH] explain execabort error Signed-off-by: zhaozhao.zz --- topics/transactions.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/topics/transactions.md b/topics/transactions.md index a96c32fb..d8f37640 100644 --- a/topics/transactions.md +++ b/topics/transactions.md @@ -148,6 +148,25 @@ failover EXEC ==> -REDIRECT ``` +Before the `EXEC` command is processed, if a command accesses data that does not belong to the current node, +a `-MOVED` or `-REDIRECT` error will be returned immediately, and the `EXEC` command will receive an `EXECABORT` error. + +For cluster mode: + +``` +MULTI ==> +OK +SET x y ==> -MOVED +EXEC ==> -EXECABORT +``` + +For standalone mode: + +``` +MULTI ==> +OK +SET x y ==> -REDIRECT +EXEC ==> -EXECABORT +``` + ## What about rollbacks? Valkey does not support rollbacks of transactions since supporting rollbacks