Skip to content

Commit

Permalink
Return error when txn conflicted
Browse files Browse the repository at this point in the history
  • Loading branch information
shafreeck committed Nov 19, 2018
1 parent 64043bf commit b2a6dc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion command/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ func Exec(ctx *Context) {
zap.String("command", ctx.Name),
zap.String("traceid", ctx.TraceID),
zap.Error(err))
resp.ReplyArray(ctx.Out, 0)
if watching {
resp.ReplyArray(ctx.Out, 0)
return
}
resp.ReplyError(ctx.Out, "EXECABORT Transaction discarded because of txn conflicts")
return
}

Expand Down

0 comments on commit b2a6dc1

Please sign in to comment.