1. 07 Oct, 2016 1 commit
  2. 06 Oct, 2016 2 commits
    • antirez's avatar
      Module: Ability to get context from IO context. · 152c1b68
      antirez authored
      It was noted by @dvirsky that it is not possible to use string functions
      when writing the AOF file. This sometimes is critical since the command
      rewriting may need to be built in the context of the AOF callback, and
      without access to the context, and the limited types that the AOF
      production functions will accept, this can be an issue.
      
      Moreover there are other needs that we can't anticipate regarding the
      ability to use Redis Modules APIs using the context in order to build
      representations to emit AOF / RDB.
      
      Because of this a new API was added that allows the user to get a
      temporary context from the IO context. The context is auto released
      if obtained when the RDB / AOF callback returns.
      
      Calling multiple time the function to get the context, always returns
      the same one, since it is invalid to have more than a single context.
      152c1b68
    • antirez's avatar
      Copyright notice added to module.c. · 72279e3e
      antirez authored
      72279e3e
  3. 02 Oct, 2016 2 commits
  4. 21 Sep, 2016 1 commit
  5. 14 Sep, 2016 1 commit
    • oranagra's avatar
      dict.c: introduce dictUnlink(). · afcbcc0e
      oranagra authored
      Notes by @antirez:
      
      This patch was picked from a larger commit by Oran and adapted to change
      the API a bit. The basic idea is to avoid double lookups when there is
      to use the value of the deleted entry.
      
      BEFORE:
      
          entry = dictFind( ... ); /* 1st lookup. */
          /* Do somethjing with the entry. */
          dictDelete(...);         /* 2nd lookup. */
      
      AFTER:
      
          entry = dictUnlink( ... ); /* 1st lookup. */
          /* Do somethjing with the entry. */
          dictFreeUnlinkedEntry(entry); /* No lookups!. */
      afcbcc0e
  6. 09 Sep, 2016 1 commit
  7. 03 Aug, 2016 2 commits
  8. 02 Aug, 2016 1 commit
    • antirez's avatar
      Modules: StringAppendBuffer() and ability to retain strings. · 7829e4ed
      antirez authored
      RedisModule_StringRetain() allows, when automatic memory management is
      on, to keep string objects living after the callback returns. Can also
      be used in order to use Redis reference counting of objects inside
      modules.
      
      The reason why this is useful is that sometimes when implementing new
      data types we want to reference RedisModuleString objects inside the
      module private data structures, so those string objects must be valid
      after the callback returns even if not referenced inside the Redis key
      space.
      7829e4ed
  9. 23 Jun, 2016 6 commits
    • antirez's avatar
      Actually remove static from #3331. · 0f484d83
      antirez authored
      I forgot -a when amending in the previous commit.
      0f484d83
    • antirez's avatar
      Minor change to conform PR #3331 to Redis code base style. · c0ca87dc
      antirez authored
      Also avoid "static" in order to have symbols during crashes.
      c0ca87dc
    • antirez's avatar
      Modules: changes to logging function. · 4b12c6a3
      antirez authored
      This commit changes what provided by PR #3315 (merged) in order to
      let the user specify the log level as a string.
      
      The define could be also used, but when this happens, they must be
      decoupled from the defines in the Redis core, like in the other part of
      the Redis modules implementations, so that a switch statement (or a
      function) remaps between the two, otherwise we are no longer free to
      change the internal Redis defines.
      4b12c6a3
    • Yossi Gottlieb's avatar
      715794b8
    • antirez's avatar
      Commit change in autoMemoryFreed(): first -> last. · b5072897
      antirez authored
      It's more natural to call the last entry added as "last", the original
      commet got me confused until I actually read the code.
      b5072897
    • antirez's avatar
      Modules: implement zig-zag scanning in autoMemoryFreed(). · f2dbc02f
      antirez authored
      Most of the time to check the last element is the way to go, however
      there are patterns where the contrary is the best choice. Zig-zag
      scanning implemented in this commmit always checks the obvious element
      first (the last added -- think at a loop where the last element
      allocated gets freed again and again), and continues checking one
      element in the head and one in the tail.
      
      Thanks to @dvisrky that fixed the original implementation of the
      function and proposed zig zag scanning.
      f2dbc02f
  10. 22 Jun, 2016 3 commits
  11. 21 Jun, 2016 1 commit
  12. 20 Jun, 2016 1 commit
  13. 13 Jun, 2016 2 commits
  14. 05 Jun, 2016 3 commits
  15. 03 Jun, 2016 1 commit
  16. 19 May, 2016 2 commits
  17. 18 May, 2016 1 commit
  18. 17 May, 2016 1 commit
  19. 14 May, 2016 1 commit
  20. 10 May, 2016 7 commits