- 05 2月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 28 1月, 2013 1 次提交
-
-
由 antirez 提交于
decrRefCount used to get its argument as a void* pointer in order to be used as destructor where a 'void free_object(void*)' prototype is expected. However this made simpler to introduce bugs by freeing the wrong pointer. This commit fixes the argument type and introduces a new wrapper called decrRefCountVoid() that can be used when the void* argument is needed.
-
- 19 1月, 2013 3 次提交
- 15 1月, 2013 2 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
Sometimes it is much simpler to debug complex Redis installations if it is possible to assign clients a name that is displayed in the CLIENT LIST output. This is the case, for example, for "leaked" connections. The ability to provide a name to the client makes it quite trivial to understand what is the part of the code implementing the client not releasing the resources appropriately. Behavior: CLIENT SETNAME: set a name for the client, or remove the current name if an empty name is set. CLIENT GETNAME: get the current name, or a nil. CLIENT LIST: now displays the client name if any. Thanks to Mark Gravell for pushing this idea forward.
-
- 03 1月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 03 12月, 2012 2 次提交
-
-
由 antirez 提交于
Refactoring performed after issue #801 resolution (see commit 2f87cf8b) introduced a memory leak that is fixed by this commit. I simply forgot to free the new allocated dictionary in the client structure trusting the output of "make test" on OSX. However due to changes in the "leaks" utility the test was no longer testing memory leaks. This problem was also fixed. Fortunately the CI test running at ci.redis.io spotted the bug in the valgrind run. The leak never ended into a stable release.
-
由 antirez 提交于
To store the keys we block for during a blocking pop operation, in the case the client is blocked for more data to arrive, we used a simple linear array of redis objects, in the blockingState structure: robj **keys; int count; However in order to fix issue #801 we also use a dictionary in order to avoid to end in the blocked clients queue for the same key multiple times with the same client. The dictionary was only temporary, just to avoid duplicates, but since we create / destroy it there is no point in doing this duplicated work, so this commit simply use a dictionary as the main structure to store the keys we are blocked for. So instead of the previous fields we now just have: dict *keys; This simplifies the code and reduces the work done by the server during a blocking POP operation.
-
- 09 11月, 2012 1 次提交
-
-
由 antirez 提交于
-
- 02 11月, 2012 2 次提交
-
-
由 Yecheng Fu 提交于
-
由 antirez 提交于
This also fixes issue #745.
-
- 27 6月, 2012 1 次提交
-
-
由 antirez 提交于
The REPLCONF command is an internal command (not designed to be directly used by normal clients) that allows a slave to set some replication related state in the master before issuing SYNC to start the replication. The initial motivation for this command, and the only reason currently it is used by the implementation, is to let the slave instance communicate its listening port to the slave, so that the master can show all the slaves with their listening ports in the "replication" section of the INFO output. This allows clients to auto discover and query all the slaves attached into a master. Currently only a single option of the REPLCONF command is supported, and it is called "listening-port", so the slave now starts the replication process with something like the following chat: REPLCONF listening-prot 6380 SYNC Note that this works even if the master is an older version of Redis and does not understand REPLCONF, because the slave ignores the REPLCONF error. In the future REPLCONF can be used for partial replication and other replication related features where there is the need to exchange information between master and slave. NOTE: This commit also fixes a bug: the INFO outout already carried information about slaves, but the port was broken, and was obtained with getpeername(2), so it was actually just the ephemeral port used by the slave to connect to the master as a client.
-
- 15 6月, 2012 1 次提交
-
-
由 antirez 提交于
In order to implement reply buffer limits introduced in 2.6 and useful to close the connection under user-selected circumastances of big output buffers (for instance slow consumers in pub/sub, a blocked slave, and so forth) Redis takes a counter with the amount of used memory in objects inside the output list stored into c->reply. The computation was broken in the function setDeferredMultiBulkLength(), in the case the object was glued with the next one. This caused the c->reply_bytes field to go out of sync, be subtracted more than needed, and wrap back near to ULONG_MAX values. This commit fixes this bug and adds an assertion that is able to trap this class of problems. This problem was discovered looking at the INFO output of an unrelated issue (issue #547).
-
- 07 4月, 2012 1 次提交
-
-
由 antirez 提交于
New client info field added to CLIENT LIST output: multi, containing the length of the current pipeline. Test modified accordingly.
-
- 29 3月, 2012 2 次提交
- 27 3月, 2012 1 次提交
-
-
由 Premysl Hruby 提交于
-
- 14 3月, 2012 2 次提交
- 13 3月, 2012 3 次提交
- 07 3月, 2012 1 次提交
-
-
由 antirez 提交于
anetPeerToString() automatically populates ip/port with something that may be provided to the user as output in case of errors.
-
- 16 2月, 2012 1 次提交
-
-
由 antirez 提交于
-
- 08 2月, 2012 1 次提交
-
-
由 antirez 提交于
Fixes to c->reply_bytes computation, and debug messages to closely study the behavior of memory pressure + slaves + maxmemory + blocked slaves.
-
- 07 2月, 2012 1 次提交
-
-
由 antirez 提交于
Precision of getClientOutputBufferMemoryUsage() greatily improved, see issue #327 for more information.
-
- 06 2月, 2012 1 次提交
-
-
由 antirez 提交于
-
- 04 2月, 2012 2 次提交
-
-
由 antirez 提交于
1) sendReplyToClient() now no longer stops transferring data to a single client in the case we are out of memory (maxmemory-wise). 2) in processCommand() the idea of we being out of memory is no longer the naive zmalloc_used_memory() > server.maxmemory. To say if we can accept or not write queries is up to the return value of freeMemoryIfNeeded(), that has full control about that. 3) freeMemoryIfNeeded() now does its math without considering output buffers size. But at the same time it can't let the output buffers to put us too much outside the max memory limit, so at the same time it makes sure there is enough effort into delivering the output buffers to the slaves, calling the write handler directly. This three changes are the result of many tests, I found (partially empirically) that is the best way to address the problem, but maybe we'll find better solutions in the future.
-
由 antirez 提交于
Use less memory when emitting the protocol, by using more shared objects for commonly emitted parts of the protocol.
-
- 26 1月, 2012 1 次提交
-
-
由 antirez 提交于
-
- 24 1月, 2012 5 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
-
由 antirez 提交于
Client output buffer limits: configuration of parameters for the different classes of clients implemented.
-
由 antirez 提交于
asyncCloseClientOnOutputBufferLimitReached() now ignores clients with REDIS_CLOSE_ASAP flag already set. Return value of the function changed from int to void since it is not used. Fixed logging of the client scheduled to be closed.
-
由 antirez 提交于
-
- 23 1月, 2012 1 次提交
-
-
由 antirez 提交于
Implementation of the internals that make possible to terminate clients overcoming configured output buffer (soft and hard) limits.
-
- 17 1月, 2012 2 次提交