redis-server 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. data/bin/redis +1 -1
  2. data/redis/Makefile +1 -1
  3. data/redis/{redis-2.2.11 → redis-2.2.12}/00-RELEASENOTES +16 -0
  4. data/redis/{redis-2.2.11 → redis-2.2.12}/BUGS +0 -0
  5. data/redis/{redis-2.2.11 → redis-2.2.12}/CONTRIBUTING +0 -0
  6. data/redis/{redis-2.2.11 → redis-2.2.12}/COPYING +0 -0
  7. data/redis/{redis-2.2.11 → redis-2.2.12}/Changelog +0 -0
  8. data/redis/{redis-2.2.11 → redis-2.2.12}/INSTALL +0 -0
  9. data/redis/{redis-2.2.11 → redis-2.2.12}/Makefile +0 -0
  10. data/redis/{redis-2.2.11 → redis-2.2.12}/README +0 -0
  11. data/redis/{redis-2.2.11 → redis-2.2.12}/TODO +0 -0
  12. data/redis/{redis-2.2.11 → redis-2.2.12}/client-libraries/README +0 -0
  13. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/COPYING +0 -0
  14. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/Makefile +0 -0
  15. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/README.md +0 -0
  16. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/TODO +0 -0
  17. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/adapters/ae.h +0 -0
  18. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/adapters/libev.h +0 -0
  19. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/adapters/libevent.h +0 -0
  20. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/async.c +0 -0
  21. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/async.h +0 -0
  22. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/example-ae.c +0 -0
  23. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/example-libev.c +0 -0
  24. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/example-libevent.c +0 -0
  25. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/example.c +0 -0
  26. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/fmacros.h +0 -0
  27. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/hiredis.c +3 -3
  28. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/hiredis.h +0 -0
  29. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/net.c +0 -0
  30. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/net.h +0 -0
  31. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/sds.c +0 -0
  32. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/sds.h +0 -0
  33. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/test.c +0 -0
  34. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/hiredis/util.h +0 -0
  35. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/linenoise/Makefile +0 -0
  36. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/linenoise/README.markdown +0 -0
  37. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/linenoise/example.c +0 -0
  38. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/linenoise/linenoise.c +0 -0
  39. data/redis/{redis-2.2.11 → redis-2.2.12}/deps/linenoise/linenoise.h +0 -0
  40. data/redis/{redis-2.2.11 → redis-2.2.12}/design-documents/REDIS-CLUSTER +0 -0
  41. data/redis/{redis-2.2.11 → redis-2.2.12}/design-documents/REDIS-CLUSTER-2 +0 -0
  42. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/AppendCommand.html +0 -0
  43. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/AppendOnlyFileHowto.html +0 -0
  44. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/AuthCommand.html +0 -0
  45. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Benchmarks.html +0 -0
  46. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/BgrewriteaofCommand.html +0 -0
  47. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/BgsaveCommand.html +0 -0
  48. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/BlpopCommand.html +0 -0
  49. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/BrpoplpushCommand.html +0 -0
  50. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/CommandReference.html +0 -0
  51. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Comparisons.html +0 -0
  52. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ConfigCommand.html +0 -0
  53. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Configuration.html +0 -0
  54. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ConnectionHandlingSidebar.html +0 -0
  55. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ControlCommandsSidebar.html +0 -0
  56. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Credits.html +0 -0
  57. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/DbsizeCommand.html +0 -0
  58. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/DelCommand.html +0 -0
  59. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/DesignPatterns.html +0 -0
  60. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/EventLibray.html +0 -0
  61. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ExistsCommand.html +0 -0
  62. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ExpireCommand.html +0 -0
  63. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/FAQ.html +0 -0
  64. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Features.html +0 -0
  65. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/FlushallCommand.html +0 -0
  66. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/FlushdbCommand.html +0 -0
  67. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/FromSqlToDataStructures.html +0 -0
  68. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/GenericCommandsSidebar.html +0 -0
  69. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/GetCommand.html +0 -0
  70. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/GetbitCommand.html +0 -0
  71. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/GetsetCommand.html +0 -0
  72. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HackingStrings.html +0 -0
  73. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HashCommandsSidebar.html +0 -0
  74. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Hashes.html +0 -0
  75. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HdelCommand.html +0 -0
  76. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HexistsCommand.html +0 -0
  77. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HgetCommand.html +0 -0
  78. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HgetallCommand.html +0 -0
  79. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HincrbyCommand.html +0 -0
  80. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HlenCommand.html +0 -0
  81. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HmgetCommand.html +0 -0
  82. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HmsetCommand.html +0 -0
  83. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HsetCommand.html +0 -0
  84. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/HsetnxCommand.html +0 -0
  85. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/IncrCommand.html +0 -0
  86. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/InfoCommand.html +0 -0
  87. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/IntroductionToRedisDataTypes.html +0 -0
  88. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/KeysCommand.html +0 -0
  89. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/LastsaveCommand.html +0 -0
  90. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/LindexCommand.html +0 -0
  91. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ListCommandsSidebar.html +0 -0
  92. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Lists.html +0 -0
  93. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/LlenCommand.html +0 -0
  94. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/LpopCommand.html +0 -0
  95. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/LrangeCommand.html +0 -0
  96. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/LremCommand.html +0 -0
  97. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/LsetCommand.html +0 -0
  98. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/LtrimCommand.html +0 -0
  99. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/MgetCommand.html +0 -0
  100. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/MonitorCommand.html +0 -0
  101. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/MoveCommand.html +0 -0
  102. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/MsetCommand.html +0 -0
  103. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/MultiExecCommand.html +0 -0
  104. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/NonexistentCommands.html +0 -0
  105. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ObjectHashMappers.html +0 -0
  106. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Pipelining.html +0 -0
  107. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ProgrammingExamples.html +0 -0
  108. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ProtocolSpecification.html +0 -0
  109. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/PublishSubscribe.html +0 -0
  110. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/QuickStart.html +0 -0
  111. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/QuitCommand.html +0 -0
  112. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/README.html +0 -0
  113. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RandomkeyCommand.html +0 -0
  114. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Redis0100ChangeLog.html +0 -0
  115. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Redis0900ChangeLog.html +0 -0
  116. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RedisBigData.html +0 -0
  117. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RedisCLI.html +0 -0
  118. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RedisEventLibrary.html +0 -0
  119. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RedisGuides.html +0 -0
  120. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RedisInternals.html +0 -0
  121. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RedisPipelining.html +0 -0
  122. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RedisStatus.html +0 -0
  123. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Redis_1_2_0_Changelog.html +0 -0
  124. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Redis_2_0_0_Changelog.html +0 -0
  125. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Redis_2_0_Whats_new.html +0 -0
  126. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RenameCommand.html +0 -0
  127. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RenamenxCommand.html +0 -0
  128. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ReplicationHowto.html +0 -0
  129. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ReplyTypes.html +0 -0
  130. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RoadMap.html +0 -0
  131. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RpoplpushCommand.html +0 -0
  132. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/RpushCommand.html +0 -0
  133. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SaddCommand.html +0 -0
  134. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SaveCommand.html +0 -0
  135. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ScardCommand.html +0 -0
  136. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SdiffCommand.html +0 -0
  137. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SdiffstoreCommand.html +0 -0
  138. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SelectCommand.html +0 -0
  139. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SetCommand.html +0 -0
  140. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SetCommandsSidebar.html +0 -0
  141. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SetbitCommand.html +0 -0
  142. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SetexCommand.html +0 -0
  143. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SetnxCommand.html +0 -0
  144. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SetrangeCommand.html +0 -0
  145. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Sets.html +0 -0
  146. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ShutdownCommand.html +0 -0
  147. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SideBar.html +0 -0
  148. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SinterCommand.html +0 -0
  149. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SinterstoreCommand.html +0 -0
  150. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SismemberCommand.html +0 -0
  151. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SlaveofCommand.html +0 -0
  152. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SmembersCommand.html +0 -0
  153. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SmoveCommand.html +0 -0
  154. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SortCommand.html +0 -0
  155. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SortedSetCommandsSidebar.html +0 -0
  156. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SortedSets.html +0 -0
  157. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Speed.html +0 -0
  158. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SponsorshipHistory.html +0 -0
  159. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SpopCommand.html +0 -0
  160. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SrandmemberCommand.html +0 -0
  161. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SremCommand.html +0 -0
  162. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/StringCommandsSidebar.html +0 -0
  163. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/Strings.html +0 -0
  164. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/StrlenCommand.html +0 -0
  165. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SubstrCommand.html +0 -0
  166. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SunionCommand.html +0 -0
  167. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SunionstoreCommand.html +0 -0
  168. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SupportedLanguages.html +0 -0
  169. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/SupportedPlatforms.html +0 -0
  170. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/TemplateCommand.html +0 -0
  171. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/TtlCommand.html +0 -0
  172. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/TwitterAlikeExample.html +0 -0
  173. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/TypeCommand.html +0 -0
  174. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/UnstableSource.html +0 -0
  175. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/VirtualMemorySpecification.html +0 -0
  176. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/VirtualMemoryUserGuide.html +0 -0
  177. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZaddCommand.html +0 -0
  178. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZcardCommand.html +0 -0
  179. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZincrbyCommand.html +0 -0
  180. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZrangeCommand.html +0 -0
  181. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZrangebyscoreCommand.html +0 -0
  182. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZrankCommand.html +0 -0
  183. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZremCommand.html +0 -0
  184. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZremrangebyrankCommand.html +0 -0
  185. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZremrangebyscoreCommand.html +0 -0
  186. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZscoreCommand.html +0 -0
  187. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZunionCommand.html +0 -0
  188. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/ZunionstoreCommand.html +0 -0
  189. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/index.html +0 -0
  190. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/redis.png +0 -0
  191. data/redis/{redis-2.2.11 → redis-2.2.12}/doc/style.css +0 -0
  192. data/redis/{redis-2.2.11 → redis-2.2.12}/redis.conf +27 -0
  193. data/redis/{redis-2.2.11 → redis-2.2.12}/src/Makefile +38 -18
  194. data/redis/{redis-2.2.11 → redis-2.2.12}/src/adlist.c +0 -0
  195. data/redis/{redis-2.2.11 → redis-2.2.12}/src/adlist.h +0 -0
  196. data/redis/{redis-2.2.11 → redis-2.2.12}/src/ae.c +0 -0
  197. data/redis/{redis-2.2.11 → redis-2.2.12}/src/ae.h +0 -0
  198. data/redis/{redis-2.2.11 → redis-2.2.12}/src/ae_epoll.c +0 -0
  199. data/redis/{redis-2.2.11 → redis-2.2.12}/src/ae_kqueue.c +0 -0
  200. data/redis/{redis-2.2.11 → redis-2.2.12}/src/ae_select.c +0 -0
  201. data/redis/{redis-2.2.11 → redis-2.2.12}/src/anet.c +0 -0
  202. data/redis/{redis-2.2.11 → redis-2.2.12}/src/anet.h +0 -0
  203. data/redis/{redis-2.2.11 → redis-2.2.12}/src/aof.c +5 -3
  204. data/redis/{redis-2.2.11 → redis-2.2.12}/src/config.c +37 -0
  205. data/redis/{redis-2.2.11 → redis-2.2.12}/src/config.h +0 -0
  206. data/redis/{redis-2.2.11 → redis-2.2.12}/src/db.c +20 -3
  207. data/redis/{redis-2.2.11 → redis-2.2.12}/src/debug.c +6 -0
  208. data/redis/{redis-2.2.11 → redis-2.2.12}/src/dict.c +0 -0
  209. data/redis/{redis-2.2.11 → redis-2.2.12}/src/dict.h +0 -0
  210. data/redis/{redis-2.2.11 → redis-2.2.12}/src/fmacros.h +0 -0
  211. data/redis/{redis-2.2.11 → redis-2.2.12}/src/help.h +0 -0
  212. data/redis/{redis-2.2.11 → redis-2.2.12}/src/intset.c +0 -0
  213. data/redis/{redis-2.2.11 → redis-2.2.12}/src/intset.h +0 -0
  214. data/redis/{redis-2.2.11 → redis-2.2.12}/src/lzf.h +0 -0
  215. data/redis/{redis-2.2.11 → redis-2.2.12}/src/lzfP.h +0 -0
  216. data/redis/{redis-2.2.11 → redis-2.2.12}/src/lzf_c.c +0 -0
  217. data/redis/{redis-2.2.11 → redis-2.2.12}/src/lzf_d.c +0 -0
  218. data/redis/{redis-2.2.11 → redis-2.2.12}/src/mkreleasehdr.sh +0 -0
  219. data/redis/{redis-2.2.11 → redis-2.2.12}/src/multi.c +8 -3
  220. data/redis/{redis-2.2.11 → redis-2.2.12}/src/networking.c +2 -1
  221. data/redis/{redis-2.2.11 → redis-2.2.12}/src/object.c +0 -0
  222. data/redis/{redis-2.2.11 → redis-2.2.12}/src/pqsort.c +0 -0
  223. data/redis/{redis-2.2.11 → redis-2.2.12}/src/pqsort.h +0 -0
  224. data/redis/{redis-2.2.11 → redis-2.2.12}/src/pubsub.c +0 -0
  225. data/redis/{redis-2.2.11 → redis-2.2.12}/src/rdb.c +0 -0
  226. data/redis/{redis-2.2.11 → redis-2.2.12}/src/redis-benchmark.c +0 -0
  227. data/redis/{redis-2.2.11 → redis-2.2.12}/src/redis-check-aof.c +0 -0
  228. data/redis/{redis-2.2.11 → redis-2.2.12}/src/redis-check-dump.c +0 -0
  229. data/redis/{redis-2.2.11 → redis-2.2.12}/src/redis-cli.c +0 -0
  230. data/redis/{redis-2.2.11 → redis-2.2.12}/src/redis.c +65 -49
  231. data/redis/{redis-2.2.11 → redis-2.2.12}/src/redis.h +11 -3
  232. data/redis/{redis-2.2.11 → redis-2.2.12}/src/release.c +0 -0
  233. data/redis/{redis-2.2.11 → redis-2.2.12}/src/replication.c +0 -0
  234. data/redis/{redis-2.2.11 → redis-2.2.12}/src/sds.c +0 -0
  235. data/redis/{redis-2.2.11 → redis-2.2.12}/src/sds.h +0 -0
  236. data/redis/{redis-2.2.11 → redis-2.2.12}/src/sha1.c +0 -0
  237. data/redis/{redis-2.2.11 → redis-2.2.12}/src/sha1.h +0 -0
  238. data/redis/redis-2.2.12/src/slowlog.c +115 -0
  239. data/redis/redis-2.2.12/src/slowlog.h +15 -0
  240. data/redis/{redis-2.2.11 → redis-2.2.12}/src/solarisfixes.h +0 -0
  241. data/redis/{redis-2.2.11 → redis-2.2.12}/src/sort.c +0 -0
  242. data/redis/{redis-2.2.11 → redis-2.2.12}/src/syncio.c +0 -0
  243. data/redis/{redis-2.2.11 → redis-2.2.12}/src/t_hash.c +0 -0
  244. data/redis/{redis-2.2.11 → redis-2.2.12}/src/t_list.c +3 -0
  245. data/redis/{redis-2.2.11 → redis-2.2.12}/src/t_set.c +0 -0
  246. data/redis/{redis-2.2.11 → redis-2.2.12}/src/t_string.c +0 -0
  247. data/redis/{redis-2.2.11 → redis-2.2.12}/src/t_zset.c +0 -0
  248. data/redis/{redis-2.2.11 → redis-2.2.12}/src/testhelp.h +0 -0
  249. data/redis/{redis-2.2.11 → redis-2.2.12}/src/util.c +12 -0
  250. data/redis/{redis-2.2.11 → redis-2.2.12}/src/valgrind.sup +0 -0
  251. data/redis/redis-2.2.12/src/version.h +1 -0
  252. data/redis/{redis-2.2.11 → redis-2.2.12}/src/vm.c +4 -4
  253. data/redis/{redis-2.2.11 → redis-2.2.12}/src/ziplist.c +0 -0
  254. data/redis/{redis-2.2.11 → redis-2.2.12}/src/ziplist.h +0 -0
  255. data/redis/{redis-2.2.11 → redis-2.2.12}/src/zipmap.c +0 -0
  256. data/redis/{redis-2.2.11 → redis-2.2.12}/src/zipmap.h +0 -0
  257. data/redis/{redis-2.2.11 → redis-2.2.12}/src/zmalloc.c +0 -10
  258. data/redis/{redis-2.2.11 → redis-2.2.12}/src/zmalloc.h +0 -3
  259. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/assets/default.conf +0 -0
  260. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/integration/aof.tcl +18 -0
  261. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/integration/redis-cli.tcl +0 -0
  262. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/integration/replication.tcl +0 -0
  263. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/support/redis.tcl +0 -0
  264. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/support/server.tcl +0 -0
  265. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/support/test.tcl +0 -0
  266. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/support/tmpfile.tcl +0 -0
  267. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/support/util.tcl +0 -0
  268. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/test_helper.tcl +2 -1
  269. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/auth.tcl +0 -0
  270. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/basic.tcl +0 -0
  271. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/cas.tcl +0 -0
  272. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/expire.tcl +0 -0
  273. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/other.tcl +0 -0
  274. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/printver.tcl +0 -0
  275. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/protocol.tcl +0 -0
  276. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/pubsub.tcl +0 -0
  277. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/quit.tcl +0 -0
  278. data/redis/redis-2.2.12/tests/unit/slowlog.tcl +41 -0
  279. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/sort.tcl +0 -0
  280. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/type/hash.tcl +0 -0
  281. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/type/list.tcl +0 -0
  282. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/type/set.tcl +0 -0
  283. data/redis/{redis-2.2.11 → redis-2.2.12}/tests/unit/type/zset.tcl +0 -0
  284. data/redis/{redis-2.2.11 → redis-2.2.12}/utils/build-static-symbols.tcl +0 -0
  285. data/redis/{redis-2.2.11 → redis-2.2.12}/utils/generate-command-help.rb +0 -0
  286. data/redis/{redis-2.2.11 → redis-2.2.12}/utils/mktarball.sh +0 -0
  287. data/redis/{redis-2.2.11 → redis-2.2.12}/utils/redis-copy.rb +0 -0
  288. data/redis/{redis-2.2.11 → redis-2.2.12}/utils/redis-sha1.rb +0 -0
  289. data/redis/{redis-2.2.11 → redis-2.2.12}/utils/redis_init_script +0 -0
  290. metadata +294 -291
  291. data/redis/redis-2.2.11/src/version.h +0 -1
@@ -292,8 +292,35 @@ appendfsync everysec
292
292
  # "no" that is the safest pick from the point of view of durability.
293
293
  no-appendfsync-on-rewrite no
294
294
 
295
+ ################################## SLOW LOG ###################################
296
+
297
+ # The Redis Slow Log is a system to log queries that exceeded a specified
298
+ # execution time. The execution time does not include the I/O operations
299
+ # like talking with the client, sending the reply and so forth,
300
+ # but just the time needed to actually execute the command (this is the only
301
+ # stage of command execution where the thread is blocked and can not serve
302
+ # other requests in the meantime).
303
+ #
304
+ # You can configure the slow log with two parameters: one tells Redis
305
+ # what is the execution time, in microseconds, to exceed in order for the
306
+ # command to get logged, and the other parameter is the length of the
307
+ # slow log. When a new command is logged the oldest one is removed from the
308
+ # queue of logged commands.
309
+
310
+ # The following time is expressed in microseconds, so 1000000 is equivalent
311
+ # to one second. Note that a negative number disables the slow log, while
312
+ # a value of zero forces the logging of every command.
313
+ slowlog-log-slower-than 10000
314
+
315
+ # There is no limit to this length. Just be aware that it will consume memory.
316
+ # You can reclaim memory used by the slow log with SLOWLOG RESET.
317
+ slowlog-max-len 1024
318
+
295
319
  ################################ VIRTUAL MEMORY ###############################
296
320
 
321
+ ### WARNING! Virtual Memory is deprecated in Redis 2.4
322
+ ### The use of Virtual Memory is strongly discouraged.
323
+
297
324
  # Virtual Memory allows Redis to work with datasets bigger than the actual
298
325
  # amount of RAM needed to hold the whole dataset in memory.
299
326
  # In order to do so very used keys are taken in memory while the other keys
@@ -5,6 +5,19 @@
5
5
  release_hdr := $(shell sh -c './mkreleasehdr.sh')
6
6
  uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
7
7
  OPTIMIZATION?=-O2
8
+
9
+ CCCOLOR="\033[34m"
10
+ LINKCOLOR="\033[34;1m"
11
+ SRCCOLOR="\033[33m"
12
+ BINCOLOR="\033[37;1m"
13
+ MAKECOLOR="\033[32;1m"
14
+ ENDCOLOR="\033[0m"
15
+
16
+ ifndef V
17
+ QUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR);
18
+ QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR);
19
+ endif
20
+
8
21
  ifeq ($(uname_S),SunOS)
9
22
  CFLAGS?= -std=c99 -pedantic $(OPTIMIZATION) -Wall -W -D__EXTENSIONS__ -D_XPG6
10
23
  CCLINK?= -ldl -lnsl -lsocket -lm -lpthread
@@ -25,7 +38,7 @@ PREFIX= /usr/local
25
38
  INSTALL_BIN= $(PREFIX)/bin
26
39
  INSTALL= cp -p
27
40
 
28
- OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o vm.o pubsub.o multi.o debug.o sort.o intset.o syncio.o
41
+ OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o vm.o pubsub.o multi.o debug.o sort.o intset.o syncio.o slowlog.o
29
42
  BENCHOBJ = ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o
30
43
  CLIOBJ = anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o
31
44
  CHECKDUMPOBJ = redis-check-dump.o lzf_c.o lzf_d.o
@@ -51,7 +64,6 @@ ae_select.o: ae_select.c
51
64
  anet.o: anet.c fmacros.h anet.h
52
65
  aof.o: aof.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
53
66
  zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h
54
- chprgname.o: chprgname.c
55
67
  config.o: config.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
56
68
  zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h
57
69
  db.o: db.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
@@ -73,21 +85,26 @@ pubsub.o: pubsub.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
73
85
  zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h
74
86
  rdb.o: rdb.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
75
87
  zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h lzf.h
76
- redis-benchmark.o: redis-benchmark.c fmacros.h ae.h anet.h sds.h adlist.h \
77
- zmalloc.h
88
+ redis-benchmark.o: redis-benchmark.c fmacros.h ae.h \
89
+ ../deps/hiredis/hiredis.h sds.h adlist.h zmalloc.h
78
90
  redis-check-aof.o: redis-check-aof.c fmacros.h config.h
79
91
  redis-check-dump.o: redis-check-dump.c lzf.h
80
- redis-cli.o: redis-cli.c fmacros.h version.h sds.h adlist.h zmalloc.h
92
+ redis-cli.o: redis-cli.c fmacros.h version.h ../deps/hiredis/hiredis.h \
93
+ sds.h zmalloc.h ../deps/linenoise/linenoise.h help.h
81
94
  redis.o: redis.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
82
- zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h
95
+ zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h slowlog.h
83
96
  release.o: release.c release.h
84
97
  replication.o: replication.c redis.h fmacros.h config.h ae.h sds.h dict.h \
85
98
  adlist.h zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h
86
99
  sds.o: sds.c sds.h zmalloc.h
87
100
  sha1.o: sha1.c sha1.h
101
+ slowlog.o: slowlog.c redis.h fmacros.h config.h ae.h sds.h dict.h \
102
+ adlist.h zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h \
103
+ slowlog.h
88
104
  sort.o: sort.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
89
105
  zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h pqsort.h
90
- syncio.o: syncio.c
106
+ syncio.o: syncio.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
107
+ zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h
91
108
  t_hash.o: t_hash.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
92
109
  zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h
93
110
  t_list.o: t_list.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
@@ -104,42 +121,45 @@ vm.o: vm.c redis.h fmacros.h config.h ae.h sds.h dict.h adlist.h \
104
121
  zmalloc.h anet.h zipmap.h ziplist.h intset.h version.h
105
122
  ziplist.o: ziplist.c zmalloc.h ziplist.h
106
123
  zipmap.o: zipmap.c zmalloc.h
107
- zmalloc.o: zmalloc.c config.h
124
+ zmalloc.o: zmalloc.c config.h zmalloc.h
108
125
 
109
126
  dependencies:
127
+ @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)hiredis$(ENDCOLOR)
110
128
  cd ../deps/hiredis && $(MAKE) static ARCH="$(ARCH)"
129
+ @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)linenoise$(ENDCOLOR)
111
130
  cd ../deps/linenoise && $(MAKE) ARCH="$(ARCH)"
112
131
 
113
132
  redis-server: $(OBJ)
114
- $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
133
+ $(QUIET_LINK)$(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
115
134
 
116
135
  redis-benchmark: dependencies $(BENCHOBJ)
117
- cd ../deps/hiredis && $(MAKE) static
118
- $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ) ../deps/hiredis/libhiredis.a
136
+ @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)hiredis$(ENDCOLOR)
137
+ cd ../deps/hiredis && $(MAKE) static ARCH="$(ARCH)"
138
+ $(QUIET_LINK)$(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ) ../deps/hiredis/libhiredis.a
119
139
 
120
140
  redis-benchmark.o:
121
- $(CC) -c $(CFLAGS) -I../deps/hiredis $(DEBUG) $(COMPILE_TIME) $<
141
+ $(QUIET_CC)$(CC) -c $(CFLAGS) -I../deps/hiredis $(DEBUG) $(COMPILE_TIME) $<
122
142
 
123
143
  redis-cli: dependencies $(CLIOBJ)
124
- $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ) ../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o
144
+ $(QUIET_LINK)$(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ) ../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o
125
145
 
126
146
  redis-cli.o:
127
- $(CC) -c $(CFLAGS) -I../deps/hiredis -I../deps/linenoise $(DEBUG) $(COMPILE_TIME) $<
147
+ $(QUIET_CC)$(CC) -c $(CFLAGS) -I../deps/hiredis -I../deps/linenoise $(DEBUG) $(COMPILE_TIME) $<
128
148
 
129
149
  redis-check-dump: $(CHECKDUMPOBJ)
130
- $(CC) -o $(CHECKDUMPPRGNAME) $(CCOPT) $(DEBUG) $(CHECKDUMPOBJ)
150
+ $(QUIET_LINK)$(CC) -o $(CHECKDUMPPRGNAME) $(CCOPT) $(DEBUG) $(CHECKDUMPOBJ)
131
151
 
132
152
  redis-check-aof: $(CHECKAOFOBJ)
133
- $(CC) -o $(CHECKAOFPRGNAME) $(CCOPT) $(DEBUG) $(CHECKAOFOBJ)
153
+ $(QUIET_LINK)$(CC) -o $(CHECKAOFPRGNAME) $(CCOPT) $(DEBUG) $(CHECKAOFOBJ)
134
154
 
135
155
  .c.o:
136
- $(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $<
156
+ $(QUIET_CC)$(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $<
137
157
 
138
158
  clean:
139
159
  rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) $(CHECKDUMPPRGNAME) $(CHECKAOFPRGNAME) *.o *.gcda *.gcno *.gcov
140
160
 
141
161
  dep:
142
- $(CC) -MM *.c
162
+ $(CC) -MM *.c -I ../deps/hiredis -I ../deps/linenoise
143
163
 
144
164
  test: redis-server
145
165
  (cd ..; tclsh8.5 tests/test_helper.tcl --tags "${TAGS}" --file "${FILE}")
@@ -19,15 +19,15 @@ void stopAppendOnly(void) {
19
19
  server.appendseldb = -1;
20
20
  server.appendonly = 0;
21
21
  /* rewrite operation in progress? kill it, wait child exit */
22
- if (server.bgsavechildpid != -1) {
22
+ if (server.bgrewritechildpid != -1) {
23
23
  int statloc;
24
24
 
25
- if (kill(server.bgsavechildpid,SIGKILL) != -1)
25
+ if (kill(server.bgrewritechildpid,SIGKILL) != -1)
26
26
  wait3(&statloc,0,NULL);
27
27
  /* reset the buffer accumulating changes while the child saves */
28
28
  sdsfree(server.bgrewritebuf);
29
29
  server.bgrewritebuf = sdsempty();
30
- server.bgsavechildpid = -1;
30
+ server.bgrewritechildpid = -1;
31
31
  }
32
32
  }
33
33
 
@@ -284,6 +284,8 @@ int loadAppendOnlyFile(char *filename) {
284
284
 
285
285
  /* The fake client should not have a reply */
286
286
  redisAssert(fakeClient->bufpos == 0 && listLength(fakeClient->reply) == 0);
287
+ /* The fake client should never get blocked */
288
+ redisAssert((fakeClient->flags & REDIS_BLOCKED) == 0);
287
289
 
288
290
  /* Clean up. Command code may have changed argv/argc so we use the
289
291
  * argv/argc of the client instead of the local variables. */
@@ -30,6 +30,7 @@ void loadServerConfig(char *filename) {
30
30
  char buf[REDIS_CONFIGLINE_MAX+1], *err = NULL;
31
31
  int linenum = 0;
32
32
  sds line = NULL;
33
+ int really_use_vm = 0;
33
34
 
34
35
  if (filename[0] == '-' && filename[1] == '\0')
35
36
  fp = stdin;
@@ -243,6 +244,10 @@ void loadServerConfig(char *filename) {
243
244
  if ((server.vm_enabled = yesnotoi(argv[1])) == -1) {
244
245
  err = "argument must be 'yes' or 'no'"; goto loaderr;
245
246
  }
247
+ } else if (!strcasecmp(argv[0],"really-use-vm") && argc == 2) {
248
+ if ((really_use_vm = yesnotoi(argv[1])) == -1) {
249
+ err = "argument must be 'yes' or 'no'"; goto loaderr;
250
+ }
246
251
  } else if (!strcasecmp(argv[0],"vm-swap-file") && argc == 2) {
247
252
  zfree(server.vm_swap_file);
248
253
  server.vm_swap_file = zstrdup(argv[1]);
@@ -288,6 +293,12 @@ void loadServerConfig(char *filename) {
288
293
  err = "Target command name already exists"; goto loaderr;
289
294
  }
290
295
  }
296
+ } else if (!strcasecmp(argv[0],"slowlog-log-slower-than") &&
297
+ argc == 2)
298
+ {
299
+ server.slowlog_log_slower_than = strtoll(argv[1],NULL,10);
300
+ } else if (!strcasecmp(argv[0],"slowlog-max-len") && argc == 2) {
301
+ server.slowlog_max_len = strtoll(argv[1],NULL,10);
291
302
  } else {
292
303
  err = "Bad directive or wrong number of arguments"; goto loaderr;
293
304
  }
@@ -297,6 +308,7 @@ void loadServerConfig(char *filename) {
297
308
  sdsfree(line);
298
309
  }
299
310
  if (fp != stdin) fclose(fp);
311
+ if (server.vm_enabled && !really_use_vm) goto vm_warning;
300
312
  return;
301
313
 
302
314
  loaderr:
@@ -305,6 +317,15 @@ loaderr:
305
317
  fprintf(stderr, ">>> '%s'\n", line);
306
318
  fprintf(stderr, "%s\n", err);
307
319
  exit(1);
320
+
321
+ vm_warning:
322
+ fprintf(stderr, "\nARE YOU SURE YOU WANT TO USE VM?\n\n");
323
+ fprintf(stderr, "Redis Virtual Memory is going to be deprecated soon,\n");
324
+ fprintf(stderr, "we think you should NOT use it, but use Redis only if\n");
325
+ fprintf(stderr, "your data is suitable for an in-memory database.\n");
326
+ fprintf(stderr, "If you *really* want VM add this in the config file:\n");
327
+ fprintf(stderr, "\n really-use-vm yes\n\n");
328
+ exit(1);
308
329
  }
309
330
 
310
331
  /*-----------------------------------------------------------------------------
@@ -446,6 +467,12 @@ void configSetCommand(redisClient *c) {
446
467
  } else if (!strcasecmp(c->argv[2]->ptr,"set-max-intset-entries")) {
447
468
  if (getLongLongFromObject(o,&ll) == REDIS_ERR || ll < 0) goto badfmt;
448
469
  server.set_max_intset_entries = ll;
470
+ } else if (!strcasecmp(c->argv[2]->ptr,"slowlog-log-slower-than")) {
471
+ if (getLongLongFromObject(o,&ll) == REDIS_ERR) goto badfmt;
472
+ server.slowlog_log_slower_than = ll;
473
+ } else if (!strcasecmp(c->argv[2]->ptr,"slowlog-max-len")) {
474
+ if (getLongLongFromObject(o,&ll) == REDIS_ERR || ll < 0) goto badfmt;
475
+ server.slowlog_max_len = (unsigned)ll;
449
476
  } else {
450
477
  addReplyErrorFormat(c,"Unsupported CONFIG parameter: %s",
451
478
  (char*)c->argv[2]->ptr);
@@ -597,6 +624,16 @@ void configGetCommand(redisClient *c) {
597
624
  addReplyBulkLongLong(c,server.set_max_intset_entries);
598
625
  matches++;
599
626
  }
627
+ if (stringmatch(pattern,"slowlog-log-slower-than",0)) {
628
+ addReplyBulkCString(c,"slowlog-log-slower-than");
629
+ addReplyBulkLongLong(c,server.slowlog_log_slower_than);
630
+ matches++;
631
+ }
632
+ if (stringmatch(pattern,"slowlog-max-len",0)) {
633
+ addReplyBulkCString(c,"slowlog-max-len");
634
+ addReplyBulkLongLong(c,server.slowlog_max_len);
635
+ matches++;
636
+ }
600
637
  setDeferredMultiBulkLength(c,replylen,matches*2);
601
638
  }
602
639
 
@@ -455,6 +455,9 @@ int expireIfNeeded(redisDb *db, robj *key) {
455
455
 
456
456
  if (when < 0) return 0; /* No expire for this key */
457
457
 
458
+ /* Don't expire anything while loading. It will be done later. */
459
+ if (server.loading) return 0;
460
+
458
461
  /* If we are running in the context of a slave, return ASAP:
459
462
  * the slave key expiration is controlled by the master that will
460
463
  * send us synthesized DEL operations for expired keys.
@@ -492,10 +495,24 @@ void expireGenericCommand(redisClient *c, robj *key, robj *param, long offset) {
492
495
  addReply(c,shared.czero);
493
496
  return;
494
497
  }
495
- if (seconds <= 0) {
496
- if (dbDelete(c->db,key)) server.dirty++;
497
- addReply(c, shared.cone);
498
+ /* EXPIRE with negative TTL, or EXPIREAT with a timestamp into the past
499
+ * should never be executed as a DEL when load the AOF or in the context
500
+ * of a slave instance.
501
+ *
502
+ * Instead we take the other branch of the IF statement setting an expire
503
+ * (possibly in the past) and wait for an explicit DEL from the master. */
504
+ if (seconds <= 0 && !server.loading && !server.masterhost) {
505
+ robj *aux;
506
+
507
+ redisAssert(dbDelete(c->db,key));
508
+ server.dirty++;
509
+
510
+ /* Replicate/AOF this as an explicit DEL. */
511
+ aux = createStringObject("DEL",3);
512
+ rewriteClientCommandVector(c,2,aux,key);
513
+ decrRefCount(aux);
498
514
  touchWatchedKey(c->db,key);
515
+ addReply(c, shared.cone);
499
516
  return;
500
517
  } else {
501
518
  time_t when = time(NULL)+seconds;
@@ -289,6 +289,12 @@ void debugCommand(redisClient *c) {
289
289
  d = sdscatprintf(d, "%02x",digest[j]);
290
290
  addReplyStatus(c,d);
291
291
  sdsfree(d);
292
+ } else if (!strcasecmp(c->argv[1]->ptr,"sleep") && c->argc == 3) {
293
+ double dtime = strtod(c->argv[2]->ptr,NULL);
294
+ long long utime = dtime*1000000;
295
+
296
+ usleep(utime);
297
+ addReply(c,shared.ok);
292
298
  } else {
293
299
  addReplyError(c,
294
300
  "Syntax error, try DEBUG [SEGFAULT|OBJECT <key>|SWAPIN <key>|SWAPOUT <key>|RELOAD]");
@@ -24,14 +24,14 @@ void freeClientMultiState(redisClient *c) {
24
24
  }
25
25
 
26
26
  /* Add a new command into the MULTI commands queue */
27
- void queueMultiCommand(redisClient *c, struct redisCommand *cmd) {
27
+ void queueMultiCommand(redisClient *c) {
28
28
  multiCmd *mc;
29
29
  int j;
30
30
 
31
31
  c->mstate.commands = zrealloc(c->mstate.commands,
32
32
  sizeof(multiCmd)*(c->mstate.count+1));
33
33
  mc = c->mstate.commands+c->mstate.count;
34
- mc->cmd = cmd;
34
+ mc->cmd = c->cmd;
35
35
  mc->argc = c->argc;
36
36
  mc->argv = zmalloc(sizeof(robj*)*c->argc);
37
37
  memcpy(mc->argv,c->argv,sizeof(robj*)*c->argc);
@@ -78,6 +78,7 @@ void execCommand(redisClient *c) {
78
78
  int j;
79
79
  robj **orig_argv;
80
80
  int orig_argc;
81
+ struct redisCommand *orig_cmd;
81
82
 
82
83
  if (!(c->flags & REDIS_MULTI)) {
83
84
  addReplyError(c,"EXEC without MULTI");
@@ -105,18 +106,22 @@ void execCommand(redisClient *c) {
105
106
  unwatchAllKeys(c); /* Unwatch ASAP otherwise we'll waste CPU cycles */
106
107
  orig_argv = c->argv;
107
108
  orig_argc = c->argc;
109
+ orig_cmd = c->cmd;
108
110
  addReplyMultiBulkLen(c,c->mstate.count);
109
111
  for (j = 0; j < c->mstate.count; j++) {
110
112
  c->argc = c->mstate.commands[j].argc;
111
113
  c->argv = c->mstate.commands[j].argv;
112
- call(c,c->mstate.commands[j].cmd);
114
+ c->cmd = c->mstate.commands[j].cmd;
115
+ call(c);
113
116
 
114
117
  /* Commands may alter argc/argv, restore mstate. */
115
118
  c->mstate.commands[j].argc = c->argc;
116
119
  c->mstate.commands[j].argv = c->argv;
120
+ c->mstate.commands[j].cmd = c->cmd;
117
121
  }
118
122
  c->argv = orig_argv;
119
123
  c->argc = orig_argc;
124
+ c->cmd = orig_cmd;
120
125
  freeClientMultiState(c);
121
126
  initClientMultiState(c);
122
127
  c->flags &= ~(REDIS_MULTI|REDIS_DIRTY_CAS);
@@ -31,6 +31,7 @@ redisClient *createClient(int fd) {
31
31
  c->reqtype = 0;
32
32
  c->argc = 0;
33
33
  c->argv = NULL;
34
+ c->cmd = NULL;
34
35
  c->multibulklen = 0;
35
36
  c->bulklen = -1;
36
37
  c->sentlen = 0;
@@ -444,6 +445,7 @@ static void freeClientArgv(redisClient *c) {
444
445
  for (j = 0; j < c->argc; j++)
445
446
  decrRefCount(c->argv[j]);
446
447
  c->argc = 0;
448
+ c->cmd = NULL;
447
449
  }
448
450
 
449
451
  void freeClient(redisClient *c) {
@@ -896,4 +898,3 @@ void rewriteClientCommandVector(redisClient *c, int argc, ...) {
896
898
  c->argc = argc;
897
899
  va_end(ap);
898
900
  }
899
-