summaryrefslogtreecommitdiff
path: root/src/multi.c
Commit message (Collapse)AuthorAgeFilesLines
...
* RDMF: More consistent define names.antirez2015-07-271-18/+18
|
* RDMF: redisAssert -> serverAssert.antirez2015-07-261-1/+1
|
* RDMF: use client instead of redisClient, like Disque.antirez2015-07-261-15/+15
|
* RDMF (Redis/Disque merge friendlyness) refactoring WIP 1.antirez2015-07-261-1/+1
|
* Cleanup double semicolonsMatt Stancliff2014-08-081-1/+1
| | | | Closes #1161
* No more trailing spaces in Redis source code.antirez2014-06-261-1/+1
|
* Transactions: propagate MULTI/EXEC only when needed.antirez2013-03-261-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MULTI/EXEC is now propagated to the AOF / Slaves only once we encounter the first command that is not a read-only one inside the transaction. The old behavior was to always propagate an empty MULTI/EXEC block when the transaction was composed just of read only commands, or even completely empty. This created two problems: 1) It's a bandwidth waste in the replication link and a space waste inside the AOF file. 2) We used to always increment server.dirty to force the propagation of the EXEC command, resulting into triggering RDB saves more often than needed. Note: even read-only commands may also trigger writes that will be propagated, when we access a key that is found expired and Redis will synthesize a DEL operation. However there is no need for this to stay inside the transaction itself, but only to be ordered. So for instance something like: MULTI GET foo SET key zap EXEC May be propagated into: DEL foo MULTI SET key zap EXEC While the DEL is outside the transaction, the commands are delivered in the right order and it is not possible for other commands to be inserted between DEL and MULTI.
* Transactions: use discardTransaction() in EXEC implementation.antirez2013-03-261-7/+2
|
* Transactions: use the propagate() API to propagate MULTI.antirez2013-03-261-6/+5
| | | | | | The behavior is the same, but the code is now cleaner and uses the proper interface instead of dealing directly with AOF/replication functions.
* PSYNC: work in progress, preview #2, rebased to unstable.antirez2013-02-121-2/+1
|
* Fixed many typos.guiquanz2013-01-191-2/+2
|
* Safer handling of MULTI/EXEC on errors.antirez2012-11-221-7/+19
| | | | | | | | | | | | | | | | | | | | | After the transcation starts with a MULIT, the previous behavior was to return an error on problems such as maxmemory limit reached. But still to execute the transaction with the subset of queued commands on EXEC. While it is true that the client was able to check for errors distinguish QUEUED by an error reply, MULTI/EXEC in most client implementations uses pipelining for speed, so all the commands and EXEC are sent without caring about replies. With this change: 1) EXEC fails if at least one command was not queued because of an error. The EXECABORT error is used. 2) A generic error is always reported on EXEC. 3) The client DISCARDs the MULTI state after a failed EXEC, otherwise pipelining multiple transactions would be basically impossible: After a failed EXEC the next transaction would be simply queued as the tail of the previous transaction.
* BSD license added to every C source and header file.antirez2012-11-081-0/+29
|
* Fix MULTI / EXEC rendering in MONITOR output.antirez2012-10-161-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Before of this commit it used to be like this: MULTI EXEC ... actual commands of the transaction ... Because after all that is the natural order of things. Transaction commands are queued and executed *only after* EXEC is called. However this makes debugging with MONITOR a mess, so the code was modified to provide a coherent output. What happens is that MULTI is rendered in the MONITOR output as far as possible, instead EXEC is propagated only after the transaction is executed, or even in the case it fails because of WATCH, so in this case you'll simply see: MULTI EXEC An empty transaction.
* Support for read-only slaves. Semantical fixes.antirez2012-03-201-5/+8
| | | | | | | | | | This commit introduces support for read only slaves via redis.conf and CONFIG GET/SET commands. Also various semantical fixes are implemented here: 1) MULTI/EXEC with only read commands now work where the server is into a state where writes (or commands increasing memory usage) are not allowed. Before this patch everything inside a transaction would fail in this conditions. 2) Scripts just calling read-only commands will work against read only slaves, when the server is out of memory, or when persistence is into an error condition. Before the patch EVAL always failed in this condition.
* Now Lua scripts dispatch Redis commands properly calling the call() ↵antirez2012-02-021-1/+1
| | | | function. In order to make this possible call() was improved with a new flags argument that controls how the Redis command is executed.
* AOF refactoring, now with three states: ON, OFF, WAIT_REWRITE.antirez2011-12-211-1/+1
|
* clean REDIS_DIRTY_CAS when discard Command runs. otherwise the next ↵woowenjie2011-11-251-1/+1
| | | | MULTI/EXEC may fail in the same RedisClient
* replaced redisAssert() with redisAssertWithInfo() in a shitload of places.antirez2011-10-041-1/+1
|
* Take a pointer to the relevant entry of the command table in the client ↵antirez2011-07-081-3/+8
| | | | structure. This is generally a more sounding design, simplifies a few functions prototype, and as a side effect fixes a bug related to the conversion of EXPIRE -1 to DEL: before of this fix Redis tried to convert it into an EXPIREAT in the AOF code, regardless of our rewrite of the command.
* Restore argc/argv in EXEC after command is executedPieter Noordhuis2011-02-231-0/+4
|
* command lookup process turned into a much more flexible and probably faster ↵antirez2010-11-031-3/+1
| | | | hash table
* Use specialized function to add status and error repliesPieter Noordhuis2010-09-021-4/+4
|
* Use specialized function to add multi bulk reply lengthPieter Noordhuis2010-09-021-1/+1
|
* redis.c split into many different C files.antirez2010-07-011-0/+266
networking related stuff moved into networking.c moved more code more work on layout of source code SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;) cleanly compiling again after the first split, now splitting it in more C files moving more things around... work in progress split replication code splitting more Sets split Hash split replication split even more splitting more splitting minor change