1. 01 Dec, 2017 3 commits
  2. 27 Nov, 2017 2 commits
    • zhaozhao.zz's avatar
      LFU: do some changes about LFU to find hotkeys · 583c3147
      zhaozhao.zz authored
      Firstly, use access time to replace the decreas time of LFU.
      For function LFUDecrAndReturn,
      it should only try to get decremented counter,
      not update LFU fields, we will update it in an explicit way.
      And we will times halve the counter according to the times of
      elapsed time than server.lfu_decay_time.
      Everytime a key is accessed, we should update the LFU
      including update access time, and increment the counter after
      call function LFUDecrAndReturn.
      If a key is overwritten, the LFU should be also updated.
      Then we can use `OBJECT freq` command to get a key's frequence,
      and LFUDecrAndReturn should be called in `OBJECT freq` command
      in case of the key has not been accessed for a long time,
      because we update the access time only when the key is read or
      overwritten.
      583c3147
    • antirez's avatar
      Improve OBJECT HELP descriptions. · 75fa7879
      antirez authored
      See #4472.
      75fa7879
  3. 24 Nov, 2017 2 commits
  4. 23 Nov, 2017 1 commit
    • Oran Agra's avatar
      fix string to double conversion, stopped parsing on \0 even if the string has more data. · adf2701c
      Oran Agra authored
      getLongLongFromObject calls string2ll which has this line:
      /* Return if not all bytes were used. */
      so if you pass an sds with 3 characters "1\01" it will fail.
      
      but getLongDoubleFromObject calls strtold, and considers it ok if eptr[0]==`\0`
      i.e. if the end of the string found by strtold ends with null terminator
      
      127.0.0.1:6379> set a 1
      OK
      127.0.0.1:6379> setrange a 2 2
      (integer) 3
      127.0.0.1:6379> get a
      "1\x002"
      127.0.0.1:6379> incrbyfloat a 2
      "3"
      127.0.0.1:6379> get a
      "3"
      adf2701c
  5. 08 Nov, 2017 1 commit
  6. 30 Oct, 2017 1 commit
    • antirez's avatar
      More robust object -> double conversion. · de474186
      antirez authored
      Certain checks were useless, at the same time certain malformed inputs
      were accepted without problems (emtpy strings parsed as zero).
      Cases where strtod() returns ERANGE but we still want to parse the input
      where ok in getDoubleFromObject() but not in the long variant.
      
      As a side effect of these fixes, this commit fixes #4391.
      de474186
  7. 28 Jul, 2017 1 commit
  8. 27 Jan, 2017 1 commit
  9. 26 Jan, 2017 1 commit
  10. 12 Jan, 2017 1 commit
  11. 06 Dec, 2016 1 commit
  12. 31 Oct, 2016 1 commit
  13. 21 Sep, 2016 1 commit
  14. 16 Sep, 2016 6 commits
  15. 15 Sep, 2016 5 commits
  16. 13 Sep, 2016 2 commits
    • antirez's avatar
      MEMORY OVERHEAD implemented (using Oran Agra initial implementation). · 8c84c962
      antirez authored
      This code was extracted from @oranagra PR #3223 and modified in order
      to provide only certain amounts of information compared to the original
      code. It was also moved from DEBUG to the newly introduced MEMORY
      command. Thanks to Oran for the implementation and the PR.
      
      It implements detailed memory usage stats that can be useful in both
      provisioning and troubleshooting memory usage in Redis.
      8c84c962
    • antirez's avatar
      objectComputeSize(): estimate collections sampling N elements. · 89dec692
      antirez authored
      For most tasks, we need the memory estimation to be O(1) by default.
      This commit also implements an initial MEMORY command.
      Note that objectComputeSize() takes the number of samples to check as
      argument, so MEMORY should be able to get the sample size as option
      to make precision VS CPU tradeoff tunable.
      
      Related to: PR #3223.
      89dec692
  17. 12 Sep, 2016 1 commit
  18. 21 Jul, 2016 1 commit
  19. 18 Jul, 2016 1 commit
    • antirez's avatar
      LFU: Initial naive eviction cycle. · a8e2d084
      antirez authored
      It is possible to get better results by using the pool like in the LRU
      case. Also from tests during the morning I believe the current
      implementation has issues in the frequency decay function that should
      decrease the counter at periodic intervals.
      a8e2d084
  20. 15 Jul, 2016 1 commit
  21. 06 Jul, 2016 2 commits
  22. 23 Jun, 2016 1 commit
  23. 22 Jun, 2016 1 commit
  24. 20 Jun, 2016 1 commit
  25. 03 Jun, 2016 1 commit