Skip to content

Commit

Permalink
Use List<KeyValue> to read RESP3 Map reply (redis#3456)
Browse files Browse the repository at this point in the history
When implementing RESP3, I converted the Redis Map reply (map{k1->v1, k2->v2, ...}) to simple flat array (list{k1, v1, k2, v2, ...}).
In this PR, I have converted the Map reply to array of KeyValues (list{ kv{k1, v1}, kv{k2, v2}, ...}).

As a by-product of this PR, some commands were found where the return can/should be a Map instead of a List.

---

* Use List<KeyValue> to read RESP3 Map reply

* module replies

* fix lcs

* fix xinfo

* fix moduleList

* fix timeoutConnection

* fix aclLog

already fixed

* edit

* fix moduleList

* fix encodeCompleteResponse

* Fix tsInfoDebug after timeseries update

* remove commented code

* docs and test edit
  • Loading branch information
sazzad16 committed Jun 11, 2023
1 parent 869dc0b commit 7a68df8
Show file tree
Hide file tree
Showing 28 changed files with 756 additions and 441 deletions.
6 changes: 6 additions & 0 deletions docs/jedis5-breaking.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
- `zunion(ZParams params, byte[]... keys)` method now returns `List<byte[]>` (instead of `Set<byte[]>`).
- Both `zunionWithScores(ZParams params, String... keys)` and `zunionWithScores(ZParams params, byte[]... keys)` methods now return `List<Tuple>` (instead of `Set<Tuple>`).

- Both `configGet(String pattern)` and `configGet(String... patterns)` methods now return `Map<String, String>` instead of `List<String>`.
- Both `configGet(byte[] pattern)` and `configGet(byte[]... patterns)` methods now return `Map<byte[], byte[]>` instead of `List<byte[]>`.

- New `aclDelUser(String... names)` method replaces `aclDelUser(String name)` and `aclDelUser(String name, String... names)` methods.
- New `aclDelUser(byte[]... names)` method replaces `aclDelUser(byte[] name)` and `aclDelUser(byte[] name, byte[]... names)` methods.

- `tsMGet(TSMGetParams multiGetParams, String... filters)` method now returns `Map<String, TSMGetElement>` instead of `List<TSKeyValue<TSElement>>`.

- Following methods now return `Map<String, TSMRangeElements>` instead of `List<TSKeyedElements>`:
Expand Down
Loading

0 comments on commit 7a68df8

Please sign in to comment.