summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Dynamic HZ: adapt cron frequency to number of clients.dynamic-hzantirez2018-07-232-5/+17
|
* Dynamic HZ: separate hz from the configured hz.antirez2018-07-233-9/+15
| | | | | | This way we can remember what the user configured HZ is, but change the actual HZ dynamically if needed in the dynamic HZ feature implementation.
* Top comment clientsCron().antirez2018-07-201-4/+19
|
* Clarify that clientsCronTrackExpansiveClients() indexes may jump ahead.antirez2018-07-201-1/+9
|
* Rename INFO CLIENT max buffers field names for correctness.antirez2018-07-191-2/+2
| | | | They are actually delayed a few seconds, so let's call them "recent".
* Fix wrong array index variable in getExpansiveClientsInfo().antirez2018-07-191-1/+1
|
* Change INFO CLIENTS sections to report pre-computed max/min client buffers.antirez2018-07-191-5/+5
|
* Rename var in clientsCronTrackExpansiveClients() for clarity.antirez2018-07-191-3/+3
|
* Implement a function to retrieve the expansive clients mem usage.antirez2018-07-191-0/+12
|
* clientsCronTrackExpansiveClients() actual implementation.antirez2018-07-191-1/+14
|
* clientsCronTrackExpansiveClients() skeleton and ideas.antirez2018-07-191-0/+23
|
* Make vars used only by INFO CLIENTS local to the block.antirez2018-07-191-1/+1
| | | | Related to #4727.
* Merge pull request #4727 from kingpeterpaule/redis-fix-info-cliSalvatore Sanfilippo2018-07-191-1/+1
|\ | | | | move getClientsMaxBuffers func into info clients command
| * move get clients max buffer calculate into info clients commandpan.liangp2018-03-021-1/+1
| |
* | Merge branch 'unstable' of github.com:/antirez/redis into unstableantirez2018-07-182-5/+6
|\ \
| * \ Merge pull request #5138 from oranagra/improve_defrag_testSalvatore Sanfilippo2018-07-182-5/+6
| |\ \ | | | | | | | | make active defrag test more stable
| | * | make active defrag test more stableOran Agra2018-07-182-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on slower machines, the active defrag test tended to fail. although the fragmentation ratio was below the treshold, the defragger was still in the middle of a scan cycle. this commit changes: - the defragger uses the current fragmentation state, rather than the cache one that is updated by server cron every 100ms. this actually fixes a bug of starting one excess scan cycle - the test lets the defragger use more CPU cycles, in hope that the defrag will be faster, but also give it more time before we give up.
* | | | In addReplyErrorLength() only panic when replying to slave.antirez2018-07-181-3/+4
| | | | | | | | | | | | | | | | See #5135 for more context.
* | | | Refine comment in addReplyErrorLength() about replying to masters/slaves.antirez2018-07-181-0/+11
|/ / / | | | | | | | | | See #5135 for some context.
* | | Merge pull request #5122 from trevor211/allowWritesWhenAofDisabledSalvatore Sanfilippo2018-07-171-1/+2
|\ \ \ | | | | | | | | Accept write commands if persisting is disabled
| * | | Accept write commands if persisting is disabled,WuYunlong2018-07-141-1/+2
| | | | | | | | | | | | | | | | | | | | event if we do have problems persisting on disk previously.
* | | | Merge pull request #4237 from aspirewit/update-commentSalvatore Sanfilippo2018-07-171-2/+2
|\ \ \ \ | | | | | | | | | | Update the comment
| * | | | Update the commentRichard Li2017-08-181-2/+2
| | | | |
* | | | | Streams: better error when $ is given with XREADGROUP.antirez2018-07-171-2/+5
| | | | |
* | | | | Merge pull request #5136 from 0xtonyxia/fix-xread-id-parseSalvatore Sanfilippo2018-07-171-1/+6
|\ \ \ \ \ | | | | | | | | | | | | Fix xreadgroup with '$' ID.
| * | | | | Streams: remove meaningless if condition.dejun.xdj2018-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's already checked if xreadgroup is set and groupname is NULL.
| * | | | | Streams: return an error message if using xreadgroup with '$' ID.dejun.xdj2018-07-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Redis will always return an empty result when '$' ID is specified with xreadgroup command, it's meaningless.
* | | | | | Panic when we are sending an error to our master/slave.antirez2018-07-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Related to #5135, see discussion there.
* | | | | | Merge pull request #5135 from oranagra/rare_repl_corruptionSalvatore Sanfilippo2018-07-173-9/+18
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | fix rare replication stream corruption with disk-based replication
| * | | | | fix rare replication stream corruption with disk-based replicationOran Agra2018-07-173-9/+18
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The slave sends \n keepalive messages to the master while parsing the rdb, and later sends REPLCONF ACK once a second. rarely, the master recives both a linefeed char and a REPLCONF in the same read, \n*3\r\n$8\r\nREPLCONF\r\n... and it tries to trim two chars (\r\n) from the query buffer, trimming the '*' from *3\r\n$8\r\nREPLCONF\r\n... then the master tries to process a command starting with '3' and replies to the slave a bunch of -ERR and one +OK. although the slave silently ignores these (prints a log message), this corrupts the replication offset at the slave since the slave increases the replication offset, and the master did not. other than the fix in processInlineBuffer, i did several other improvments while hunting this very rare bug. - when redis replies with "unknown command" it includes a portion of the arguments, not just the command name. so it would be easier to understand what was recived, in my case, on the slave side, it was -ERR, but the "arguments" were the interesting part (containing info on the error). - about a year ago i added code in addReplyErrorLength to print the error to the log in case of a reply to master (since this string isn't actually trasmitted to the master), now changed that block to print a similar log message to indicate an error being sent from the master to the slave. note that the slave is marked as CLIENT_SLAVE only after PSYNC was received, so this will not cause any harm for REPLCONF, and will only indicate problems that are gonna corrupt the replication stream anyway. - two places were c->reply was emptied, and i wanted to reset sentlen this is a precaution (i did not actually see such a problem), since a non-zero sentlen will cause corruption to be transmitted on the socket.
* | | | | dict.c: remove a few trailing spaces.antirez2018-07-171-2/+2
| | | | |
* | | | | Merge pull request #5128 from ↵Salvatore Sanfilippo2018-07-171-2/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | kingpeterpaule/remove-one-loop-in-freeMemoryIfNeeded remove ineffective loop in dictGetSomeKeys.
| * | | | | Update dict.cpaule2018-07-161-2/+4
| | | | | | | | | | | | | | | | | | change coding style.
| * | | | | remove one ineffective loop in dictGetSomeKeys.peterpaule2018-07-161-1/+1
| | |_|_|/ | |/| | |
* | | | | Merge pull request #5113 from 0xtonyxia/using-compare-func-insteadSalvatore Sanfilippo2018-07-163-10/+4
|\ \ \ \ \ | | | | | | | | | | | | Streams: using streamCompareID() instead of direct compare.
| * | | | | Streams: using streamCompareID() instead of direct compare in block.c.dejun.xdj2018-07-141-4/+1
| | | | | |
| * | | | | Streams: add streamCompareID() declaration in stream.h.dejun.xdj2018-07-141-0/+1
| | | | | |
| * | | | | Streams: using streamCompareID() instead of direct compare.dejun.xdj2018-07-141-6/+2
| | |_|_|/ | |/| | |
* | | | | Merge pull request #5127 from oranagra/sds_req_typeSalvatore Sanfilippo2018-07-161-1/+3
|\ \ \ \ \ | | | | | | | | | | | | bugfix in sdsReqType creating 64bit sds headers on 32bit systems
| * | | | | bugfix in sdsReqType creating 64bit sds headers on 32bit systemsOran Agra2018-07-151-1/+3
| |/ / / /
* | | | | Hopefully improve commenting of #5126.antirez2018-07-162-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading the PR gave me the opportunity to better specify what the code was doing in places where I was not immediately sure about what was going on. Moreover I documented the structure in server.h so that people reading the header file will immediately understand what the structure is useful for.
* | | | | Merge pull request #5126 from oranagra/slave_buf_memory_2Salvatore Sanfilippo2018-07-1610-50/+182
|\ \ \ \ \ | | | | | | | | | | | | slave buffers were wasteful and incorrectly counted causing eviction
| * | | | | slave buffers were wasteful and incorrectly counted causing evictionOran Agra2018-07-1610-50/+182
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A) slave buffers didn't count internal fragmentation and sds unused space, this caused them to induce eviction although we didn't mean for it. B) slave buffers were consuming about twice the memory of what they actually needed. - this was mainly due to sdsMakeRoomFor growing to twice as much as needed each time but networking.c not storing more than 16k (partially fixed recently in 237a38737). - besides it wasn't able to store half of the new string into one buffer and the other half into the next (so the above mentioned fix helped mainly for small items). - lastly, the sds buffers had up to 30% internal fragmentation that was wasted, consumed but not used. C) inefficient performance due to starting from a small string and reallocing many times. what i changed: - creating dedicated buffers for reply list, counting their size with zmalloc_size - when creating a new reply node from, preallocate it to at least 16k. - when appending a new reply to the buffer, first fill all the unused space of the previous node before starting a new one. other changes: - expose mem_not_counted_for_evict info field for the benefit of the test suite - add a test to make sure slave buffers are counted correctly and that they don't cause eviction
* | | | | Merge pull request #5132 from soloestoy/propagate-xdel-correctlySalvatore Sanfilippo2018-07-161-3/+7
|\ \ \ \ \ | |_|_|/ / |/| | | | Streams: correctly propagate xdel if needed
| * | | | Streams: correctly propagate xdel if neededzhaozhao.zz2018-07-161-3/+7
|/ / / /
* | | | Add a few comments to streamIteratorRemoveEntry().antirez2018-07-161-0/+4
| | | |
* | | | Merge pull request #5131 from soloestoy/optimize-xdelSalvatore Sanfilippo2018-07-161-4/+9
|\ \ \ \ | | | | | | | | | | Streams: free lp if all elements are deleted
| * | | | Streams: free lp if all elements are deletedzhaozhao.zz2018-07-161-4/+9
| |/ / /
* | | | Modify XINFO field from last-id to last-generated-id.antirez2018-07-161-1/+1
| | | | | | | | | | | | | | | | Related to #5129.
* | | | Merge pull request #5129 from soloestoy/xinfo-show-last-idSalvatore Sanfilippo2018-07-161-2/+6
|\ \ \ \ | |/ / / |/| | | Streams: show last id for streams and groups