1. 27 Apr, 2012 3 commits
    • antirez's avatar
    • antirez's avatar
      841048f2
    • antirez's avatar
      Set LUA_MASKCOUNT hook more selectively. Fixes issue #480. · 0ad10db2
      antirez authored
      An user reported a crash with Redis scripting (see issue #480 on
      github), inspection of the kindly provided strack trace showed that
      server.lua_caller was probably set to NULL. The stack trace also slowed
      that the call to the hook was originating from a point where we just
      used to set/get a few global variables in the Lua state.
      
      What was happening is that we did not set the timeout hook selectively
      only when the user script was called. Now we set it more selectively,
      specifically only in the context of the lua_pcall() call, and make sure
      to remove the hook when the call returns. Otherwise the hook can get
      called in random contexts every time we do something with the Lua
      state.
      0ad10db2
  2. 26 Apr, 2012 3 commits
  3. 25 Apr, 2012 1 commit
  4. 24 Apr, 2012 9 commits
  5. 23 Apr, 2012 1 commit
  6. 21 Apr, 2012 2 commits
    • antirez's avatar
      Even inside #if 0 comments are comments. · eb6e7eb9
      antirez authored
      eb6e7eb9
    • antirez's avatar
      Limit memory used by big SLOWLOG entries. · d3701d27
      antirez authored
      Two limits are added:
      
      1) Up to SLOWLOG_ENTRY_MAX_ARGV arguments are logged.
      2) Up to SLOWLOG_ENTRY_MAX_STRING bytes per argument are logged.
      3) slowlog-max-len is set to 128 by default (was 1024).
      
      The number of remaining arguments / bytes is logged in the entry
      so that the user can understand better the nature of the logged command.
      d3701d27
  7. 19 Apr, 2012 1 commit
  8. 18 Apr, 2012 6 commits
  9. 17 Apr, 2012 1 commit
    • antirez's avatar
      lookupKeyByPattern() used by SORT GET/BY rewritten. Fixes issue #460. · 3c25c4a6
      antirez authored
      lookupKeyByPattern() was implemented with a trick to speedup the lookup
      process allocating two fake Redis obejcts on the stack. However now that
      we propagate expires to the slave as DEL operations the lookup of the
      key may result into a call to expireIfNeeded() having the stack
      allocated object as argument, that may in turn use it to create the
      protocol to send to the slave. But since this fake obejcts are
      inherently read-only this is a problem.
      
      As a side effect of this fix there are no longer size limits in the
      pattern to be used with GET/BY option of SORT.
      
      See https://github.com/antirez/redis/issues/460 for bug details.
      3c25c4a6
  10. 14 Apr, 2012 8 commits
  11. 13 Apr, 2012 5 commits
    • antirez's avatar
      A few var names fixed in Makefile. · c18405c9
      antirez authored
      I modified it for error in a previous commit doing search & replace.
      c18405c9
    • antirez's avatar
      EVAL errors are more clear now. · 6f659f34
      antirez authored
      6f659f34
    • antirez's avatar
      Use Lua tostring() before concatenation. · 3a021404
      antirez authored
      3a021404
    • antirez's avatar
      mt.declared is no longer needed. · d86c4a7b
      antirez authored
      Lua global protection can now be simpified becuase we no longer have the
      global() function. It's useless to occupy memory with this table, it is
      also not faster because the metamethods we use are only called when a
      global object does not exist or we are trying to create it from a
      script.
      d86c4a7b
    • antirez's avatar
      Stop access to global vars. Not configurable. · 6663653f
      antirez authored
      After considering the interaction between ability to delcare globals in
      scripts using the 'global' function, and the complexities related to
      hanlding replication and AOF in a sane way with globals AND ability to
      turn protection On and Off, we reconsidered the design. The new design
      makes clear that there is only one good way to write Redis scripts, that
      is not using globals. In the rare cases state must be retained across
      calls a Redis key can be used.
      6663653f