ArrayOutput stops response parsing on empty nested arrays
See original GitHub issueBug Report
Current Behavior
When using the redis-cell module v0.2.5 the list of redis commands that Lettuce loads is truncated.
In ReidsCommandFactory.java I put a breakpoint at the return of getCommands
- from there I can see that commands contains 137 elements when the redis-cell module is loaded, and 204 when it is not loaded.
In redis-cli I run monitor and see the COMMAND
is used to get the list of commands. When I run that with redis-cell loaded I get 205 entries.
Looking at the list of entries I see the 138th entry is
138) 1) "cl.throttle"
2) (integer) -1
3) 1) write
4) (integer) 0
5) (integer) 0
6) (integer) 0
7) (empty array)
For some reason Lettuce stops reading the list of commands at that point.
Expected behavior/code
The full list of 205 commands should be returned. My custom “CL.THROTTLE” lettuce command should work.
Environment
- Lettuce version(s): 5.3.1
- Redis version: 6.0.1
- redis-cell 0.2.5
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Typescript, JSON: Mapping nested array always returns empty
As for the answer, I think you do not need to typecast the response into a typical Interface. A simple .map(res => res.json());...
Read more >Nested field type | Elasticsearch Guide [8.5] | Elastic
The nested type is a specialised version of the object data type that allows arrays of objects to be indexed in a way...
Read more >print_r - Manual - PHP
Here is another version that parses the print_r() output. I tried the one posted, but I had difficulties with it. I believe it...
Read more >Empty arrays and collections should be returned instead of null
Returning null instead of an actual array, collection or map forces callers of the method to explicitly test for nullity, making them more...
Read more >HTTP output object instead of array - how to process?
1) Parse the JSON response. 2) Create an Empty array variable. 3) Append the Parse JSON body into this array variable. 4) In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting the issue. The bug is that
ArrayOutput
doesn’t consider nested empty arrays and therefore response processing terminates once the response contains an empty array element.Confirmed working with
5.3.2.BUILD-SNAPSHOT
. Thanks!