Used when a command that is ready for execution needs to be rejected, due to * varios pre-execution checks. it returns the appropriate error to the client. * If there's a transaction is flags it as dirty, and if the command is EXEC, * it aborts the transaction. * Note: 'reply' is expected to end with \r\n */
| 4736 | * it aborts the transaction. |
| 4737 | * Note: 'reply' is expected to end with \r\n */ |
| 4738 | void rejectCommand(client *c, robj *reply, int severity = ERR_CRITICAL) { |
| 4739 | flagTransaction(c); |
| 4740 | if (c->cmd) c->cmd->rejected_calls++; |
| 4741 | if (c->cmd && c->cmd->proc == execCommand) { |
| 4742 | execCommandAbort(c, szFromObj(reply)); |
| 4743 | } |
| 4744 | else { |
| 4745 | /* using addReplyError* rather than addReply so that the error can be logged. */ |
| 4746 | addReplyErrorObject(c, reply, severity); |
| 4747 | } |
| 4748 | } |
| 4749 | |
| 4750 | void lfenceCommand(client *c) { |
| 4751 | c->mvccCheckpoint = getMvccTstamp(); |
no test coverage detected