1. 02 Feb, 2023 1 commit
    • Roshan Khatri's avatar
      Added fields to ACL LOG error entries for precise time logging (#11477) · ac312954
      Roshan Khatri authored
      
      
      Added 3 fields to the ACL LOG - adds entry_id, timestamp_created and timestamp_last_updated, which updates similar existing log error entries. The pair - entry_id, timestamp_created is a unique identifier of this entry, in case the node dies and is restarted, it can detect that if it's a new series.
      
      The primary use case of Unique id is to uniquely identify the error messages and not to detect if the server has restarted.
      
      entry-id is the sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were "lost" if they fell between periods.
      timestamp-created is the unix-time in ms at the time the entry was first created.
      timestamp-last-updated is the unix-time in ms at the time the entry was last updated
      Time_created gives the absolute time which better accounts for network time as compared to time since. It can also be older than 60 secs and presently there is no field that can display the original time of creation once the error entry is updated.
      The reason of timestamp_last_updated field is that it provides a more precise value for the “last time” an error was seen where as, presently it is only in the 60 second period.
      Co-authored-by: default avatarMadelyn Olson <madelyneolson@gmail.com>
      ac312954
  2. 01 Feb, 2023 1 commit
  3. 26 Jan, 2023 1 commit
    • Wen Hui's avatar
      update sentinel config condition (#11751) · cc97f4cf
      Wen Hui authored
      The command:
      sentinel config set option value
      and
      sentinel config get option
      
      They should include at least 4 arguments instead of 3,
      This PR fixes this issue.
      the only impact on the client is a different error message 
      cc97f4cf
  4. 10 Jan, 2023 1 commit
  5. 28 Nov, 2022 1 commit
  6. 24 Nov, 2022 1 commit
  7. 22 Nov, 2022 1 commit
    • Itamar Haber's avatar
      Deprecates SETEX, PSETEX and SETNX (#11512) · f36eb5a1
      Itamar Haber authored
      Technically, these commands were deprecated as of 2.6.12, with the
      introduction of the respective arguments to SET.
      In reality, the deprecation note will only be added in 7.2.0.
      f36eb5a1
  8. 17 Nov, 2022 1 commit
    • Ping Xie's avatar
      Introduce Shard IDs to logically group nodes in cluster mode (#10536) · 203b12e4
      Ping Xie authored
      Introduce Shard IDs to logically group nodes in cluster mode.
      1. Added a new "shard_id" field to "cluster nodes" output and nodes.conf after "hostname"
      2. Added a new PING extension to propagate "shard_id"
      3. Handled upgrade from pre-7.2 releases automatically
      4. Refactored PING extension assembling/parsing logic
      
      Behavior of Shard IDs:
      
      Replicas will always follow the shards of their reported primaries. If a primary updates its shard ID, the replica will follow. (This need not follow for cluster v2) This is not an expected use case.
      203b12e4
  9. 09 Nov, 2022 1 commit
    • Viktor Söderqvist's avatar
      Deprecate QUIT (#11439) · 07d18706
      Viktor Söderqvist authored
      Clients should not use this command.
      Instead, clients should simply close the connection when they're not used anymore.
      Terminating a connection on the client side is preferable, as it eliminates `TIME_WAIT`
      lingering sockets on the server side.
      07d18706
  10. 02 Nov, 2022 1 commit
  11. 25 Oct, 2022 1 commit
    • Wen Hui's avatar
      Fix command GEOHASH and GEOPOS argument doc, mark member as optional (#11417) · 7c3916ae
      Wen Hui authored
      These commands take a list of members, which can be empty (i.e. running
      the command with just a key name).
      this always results in an empty array reply, so it doesn't make much sense,
      but changing it is a breaking change.
      
      This PR fixes the documentation, making the member field as optional, just makes
      sure the command format documentation is consistent with the command behavior.
      
      The command format will be:
      
      127.0.0.1:6381> GEOPOS key [member [member ...]]
      127.0.0.1:6381> GEOHASH key [member [member ...]]
      7c3916ae
  12. 22 Oct, 2022 1 commit
    • Binbin's avatar
      Make PFMERGE source key optional in docs, add tests with one input key, add... · 9e1b879f
      Binbin authored
      Make PFMERGE source key optional in docs, add tests with one input key, add tests on missing source keys (#11205)
      
      The following two cases will create an empty destkey HLL:
      1. called with no source keys, like `pfmerge destkey`
      2. called with non-existing source keys, like `pfmerge destkey non-existing-source-key`
      
      In the first case, in `PFMERGE`, the dest key is actually one of the source keys too.
      So `PFMERGE k1 k2` is equivalent to `SUNIONSTORE k1 k1 k2`,
      and `PFMERGE k1` is equivalent to `SUNIONSTORE k1 k1`.
      So the first case is reasonable, the source key is actually optional.
      
      And the second case, `PFMERGE` on missing keys should succeed and create an empty dest.
      This is consistent with `PFCOUNT`, and also with `SUNIONSTORE`, no need to change.
      9e1b879f
  13. 11 Oct, 2022 1 commit
  14. 02 Oct, 2022 2 commits
    • Binbin's avatar
      code, typo and comment cleanups (#11280) · 3c02d1ac
      Binbin authored
      - fix `the the` typo
      - `LPOPRPUSH` does not exist, should be `RPOPLPUSH`
      - `CLUSTER GETKEYINSLOT` 's time complexity should be O(N)
      - `there bytes` should be `three bytes`, this closes #11266
      - `slave` word to `replica` in log, modified the front and missed the back
      - remove useless aofReadDiffFromParent in server.h
      - `trackingHandlePendingKeyInvalidations` method adds a void parameter
      3c02d1ac
    • Huang Zhw's avatar
      fix some commands json file (#11201) · 2804eefc
      Huang Zhw authored
      - BITOP: turn argument `operation` from string to oneof
      - CLIENT KILL: turn argument `skipme` from string to oneof
      - COMMAND GETKEYS / GETKEYSANDFLAGS: change arguments to optional, and change arity to -3 (fixes regression in redis 7.0)
      - CLIENT PAUSE: this command was added in v3.0.0
      2804eefc
  15. 29 Sep, 2022 1 commit
  16. 08 Sep, 2022 1 commit
    • Wen Hui's avatar
      Update group and consumer description in json file for Unifying Stream command format (#11190) · 5389fa62
      Wen Hui authored
      For the stream data type, some commands, such as **XGROUP CREATE, XGROUP DESTROY, XGROUP CREATECONSUMER, 
      XGROUP DELCONSUMER and XINFO CONSUMERS** use groupname and consumername in the command description;
      
      However, for the commands **XREADGROUP GROUP, XPENDING, XACK , XCLAIM  and XAUTOCLAIM**  use term "group and consumer", clients could be confused.
      
      This PR goal is to unify all the commands to groupname and consumername.
      5389fa62
  17. 28 Aug, 2022 1 commit
  18. 22 Aug, 2022 1 commit
  19. 21 Aug, 2022 2 commits
  20. 18 Aug, 2022 1 commit
    • guybe7's avatar
      Repurpose redisCommandArg's name as the unique ID (#11051) · 223046ec
      guybe7 authored
      This PR makes sure that "name" is unique for all arguments in the same
      level (i.e. all args of a command and all args within a block/oneof).
      This means several argument with identical meaning can be referred to together,
      but also if someone needs to refer to a specific one, they can use its full path.
      
      In addition, the "display_text" field has been added, to be used by redis.io
      in order to render the syntax of the command (for the vast majority it is
      identical to "name" but sometimes we want to use a different string
      that is not "name")
      The "display" field is exposed via COMMAND DOCS and will be present
      for every argument, except "oneof" and "block" (which are container
      arguments)
      
      Other changes:
      1. Make sure we do not have any container arguments ("oneof" or "block")
         that contain less than two sub-args (otherwise it doesn't make sense)
      2. migrate.json: both AUTH and AUTH2 should not be "optional"
      3. arg names cannot contain underscores, and force the usage of hyphens
        (most of these were a result of the script that generated the initial json files
        from redis.io commands.json). 
      223046ec
  21. 01 Aug, 2022 1 commit
    • Rudi Floren's avatar
      Fix wrong commands json docs for CLIENT KILL (#10970) · 4ce3fd51
      Rudi Floren authored
      The docs state that there is a new and an old argument format.
      The current state of the arguments allows mixing the old and new format,
      thus the need for two additional oneof blocks.
      One for differentiating the new from the old format and then one to
      allow setting multiple filters using the new format.
      4ce3fd51
  22. 24 Jul, 2022 1 commit
  23. 20 Jul, 2022 1 commit
  24. 19 Jul, 2022 1 commit
  25. 17 Jul, 2022 1 commit
  26. 30 Jun, 2022 1 commit
    • Binbin's avatar
      Add SENTINEL command flag to CLIENT/COMMANDS subcommands (#10904) · 35e836c2
      Binbin authored
      This was harmless because we marked the parent command
      with SENTINEL flag. So the populateCommandTable was ok.
      And we also don't show the flag (SENTINEL and ONLY-SENTNEL)
      in COMMAND INFO.
      
      In this PR, we also add the same CMD_SENTINEL and CMD_ONLY_SENTINEL
      flags check when populating the sub-commands.
      so that in the future it'll be possible to add some sub-commands to sentinel or sentinel-only but not others.
      35e836c2
  27. 29 Jun, 2022 1 commit
  28. 25 Jun, 2022 1 commit
    • Steve Lorello's avatar
      changing min,max in ZRANGE -> start stop (#10097) · a64b2948
      Steve Lorello authored
      In 6.2.0 with the introduction of the REV subcommand in ZRANGE, there was a semantic shift in the arguments of ZRANGE when the REV sub-command is executed. Without the sub-command `min` and `max` (the old names of the arguments) are appropriate because if you put the min value and the max value in everything works fine.
      
      ```bash
      127.0.0.1:6379> ZADD myset 0 foo
      (integer) 1
      127.0.0.1:6379> ZADD myset 1 bar
      (integer) 1
      127.0.0.1:6379> ZRANGE myset 0 inf BYSCORE
      1) "foo"
      2) "bar"
      ``` 
      
      However - if you add the `REV` subcommand, ordering the arguments `min` `max` breaks the command:
      
      ```bash
      127.0.0.1:6379> ZRANGE myset 0 inf BYSCORE REV
      (empty array)
      ```
      
      why? because `ZRANGE` with the `REV` sub-command is expecting the `max` first and the `min` second (because it's a reverse range like `ZREVRANGEBYSCORE`):
      
      ```bash
      127.0.0.1:6379> ZRANGE myset 0 inf BYSCORE REV
      (empty array)
      ```
      a64b2948
  29. 23 Jun, 2022 1 commit
    • Binbin's avatar
      Add bus_port argument in cluster-meet.json (#10304) · aabce893
      Binbin authored
      In `CLUSTER MEET`, bus-port argument was added in 11436b14.
      For cluster announce ip / port implementation, part of the
      4.0-RC1.
      
      And in #9389, we add a new cluster-port config and make
      cluster bus port configurable, part of the 7.0-RC1.
      aabce893
  30. 14 Jun, 2022 1 commit
    • Oran Agra's avatar
      Allow ECHO in loading and stale modes (#10853) · ffa00770
      Oran Agra authored
      I noticed that scripting.tcl uses INFO from within a script and thought it's an
      overkill and concluded it's nicer to use another CMD_STALE command,
      decided to use ECHO, and then noticed it's not at all allowed in stale mode.
      probably overlooked at #6843
      ffa00770
  31. 07 Jun, 2022 2 commits
    • Bjorn Svensson's avatar
      Documentation fixes of `BITFIELD_RO` and `XINFO STREAM` (#10823) · 1067cfb3
      Bjorn Svensson authored
      Correcting the introduction version of the command `BITFIELD_RO`
      Command added by commit: b3e4abf0 
      
      Add history info of the `FULL` modifier in `XINFO STREAM`
      Modifier was added by commit: 1e2aee39
      
      (Includes output from `./utils/generate-command-code.py`)
      1067cfb3
    • Binbin's avatar
      Handle multiple_token flag in generate-command-help.rb (#10822) · 3d56f607
      Binbin authored
      Currently generate-command.help.rb dose not handle the
      multiple_token flag, handle this flag in this PR.
      The format is the same as redis-cli rendering.
      ```diff
      - bitfield_ro key GET encoding offset [encoding offset ...]
      + bitfield_ro key GET encoding offset [GET encoding offset ...]
      ```
      
      Re run generate-command-code.py which was forget in #10820.
      Also change the flag value from string to bool, like "true" to true
      3d56f607
  32. 31 May, 2022 1 commit
  33. 30 May, 2022 1 commit
  34. 27 May, 2022 1 commit
    • Binbin's avatar
      Fix some commands key spec in json files (#10779) · 2a099d49
      Binbin authored
      There are some commands that has the wrong key specs.
      This PR adds a key-spec related check in generate-command-code.py.
      Check if the index is valid, or if there is an unused index.
      
      The check result will look like:
      ```
      [root]# python utils/generate-command-code.py
      Processing json files...
      Linking container command to subcommands...
      Checking all commands...
      command: RESTORE_ASKING may have unused key_spec
      command: RENAME may have unused key_spec
      command: PFDEBUG may have unused key_spec
      command: WATCH key_specs missing flags
      command: LCS arg: key2 key_spec_index error
      command: RENAMENX may have unused key_spec
      Error: There are errors in the commands check, please check the above logs.
      ```
      
      The following commands have been fixed according to the check results:
      - RESTORE ASKING: add missing arguments section (and history section)
      - RENAME: newkey's key_spec_index should be 1
      - PFDEBUG: add missing arguments (and change the arity from -3 to 3)
      - WATCH: add missing key_specs flags: RO, like EXIST (it allow you to know the key exists, or is modified, but doesn't "leak" the data)
      - LCS: key2 key_spec_index error, there is only one key-spec
      - RENAMENX: newkey's key_spec_index should be 1
      2a099d49
  35. 13 May, 2022 1 commit
  36. 13 Apr, 2022 1 commit
    • Wen Hui's avatar
      Fix several document error and function comments (#10580) · ca913a5d
      Wen Hui authored
      
      
      This PR fix the following minor errors before Redis 7 release:
      
      ZRANGEBYLEX command in deprecated in 6.2.0, and could be replaced by ZRANGE with the
      BYLEX argument, but in the document, the words is written incorrect in " by ZRANGE with the BYSCORE argument"
      
      Fix function zpopmaxCommand incorrect comment
      
      The comments of function zmpopCommand and bzmpopCommand are not consistent with document description, fix them
      Co-authored-by: default avatarUbuntu <lucas.guang.yang1@huawei.com>
      ca913a5d
  37. 06 Apr, 2022 1 commit
    • Itamar Haber's avatar
      Fixes commands' syntices (#10534) · 3e09a8c0
      Itamar Haber authored
      Fixes in command argument in json files
      * Fixes BITFIELD's syntax ("sub-commands" can be repeated, and OVERFLOW is only valid for SET and INCR)
      * Improves readability of SET (reordered)
      * Fixes GEOSEARCH and GEOSEARCH_RO syntices (use `oneof` for mutually exclusive group instead of `optional`)
      * Fixes MIGRATE syntax (use `oneof` for mutually exclusive group instead of `optional`)
      * Fixes MODULE LOADEX syntax (the `CONFIG` token should be repeated too when using multiple configs)
      
      other:
      * make generate-command-help.rb accept a path to commands.json, or read it from stdin (e.g. `generate-commands-json.py | generate-command-help.rb -`)
      3e09a8c0