1. 19 May, 2021 1 commit
  2. 25 Mar, 2021 1 commit
    • Oran Agra's avatar
      Fix SLOWLOG for blocked commands (#8632) · 497351ad
      Oran Agra authored
      * SLOWLOG didn't record anything for blocked commands because the client
        was reset and argv was already empty. there was a fix for this issue
        specifically for modules, now it works for all blocked clients.
      * The original command argv (before being re-written) was also reset
        before adding the slowlog on behalf of the blocked command.
      * Latency monitor is now updated regardless of the slowlog flags of the
        command or its execution (their purpose is to hide sensitive info from
        the slowlog, not hide the fact the latency happened).
      * Latency monitor now uses real_cmd rather than c->cmd (which may be
        different if the command got re-written, e.g. GEOADD)
      
      Changes:
      * Unify shared code between slowlog insertion in call() and
        updateStatsOnUnblock(), hopefully prevent future bugs from happening
        due to the later being overlooked.
      * Reset CLIENT_PREVENT_LOGGING in resetClient rather than after command
        processing.
      * Add a test for SLOWLOG and BLPOP
      
      Notes:
      - real_cmd == c->lastcmd, except inside MULTI and Lua.
      - blocked commands never happen in these cases (MULTI / Lua)
      - real_cmd == c->cmd, except for when the command is rewritten (e.g.
        GEOADD)
      - blocked commands (currently) are never rewritten
      - other than the command's CLIENT_PREVENT_LOGGING, and the
        execution flag CLIENT_PREVENT_LOGGING, other cases that we want to
        avoid slowlog are on AOF loading (specifically CMD_CALL_SLOWLOG will
        be off when executed from execCommand that runs from an AOF)
      497351ad
  3. 16 Mar, 2021 1 commit
  4. 10 Nov, 2020 1 commit
  5. 08 Nov, 2020 1 commit
  6. 14 May, 2019 1 commit
    • antirez's avatar
      Test: fix slowlog test false positive. · 1a1ba483
      antirez authored
      In fast systems "SLOWLOG RESET" is fast enough to don't be logged even
      when the time limit is "1" sometimes. Leading to false positives such
      as:
      
      [err]: SLOWLOG - can be disabled in tests/unit/slowlog.tcl
      Expected '1' to be equal to '0'
      1a1ba483
  7. 13 Jul, 2018 1 commit
  8. 15 Jun, 2017 1 commit
  9. 19 Jan, 2013 1 commit
    • antirez's avatar
      Slowlog: don't log EXEC but just the executed commands. · 08d200ba
      antirez authored
      The Redis Slow Log always used to log the slow commands executed inside
      a MULTI/EXEC block. However also EXEC was logged at the end, which is
      perfectly useless.
      
      Now EXEC is no longer logged and a test was added to test this behavior.
      
      This fixes issue #759.
      08d200ba
  10. 21 Apr, 2012 1 commit
    • 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
  11. 11 Jul, 2011 1 commit
  12. 01 Jul, 2011 1 commit