redis / redis-io

Application running http://redis.io

Home Page:http://redis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug when specifing "multiple" to a complex command

yoav-steinberg opened this issue · comments

This pr: redis/redis-doc#1645
Caused the GET subcommand to replicate each time the BITFIELD_RO page was refreshed. See attached image.

Screenshot from 2021-09-13 10-32-29

I think the issue happens when you have a complex subcommand which has more than one argument but can appear multiple time. Relevant commands are BITFIELD and BITFIELD_RO. If there are others please add them to this ticket.
Once this is fixed we'll update commands.json accordingly.

I test in help.h, it is key GET type offset [GET type offset ...].

I test in help.h, it is key GET type offset [GET type offset ...].

Yes, that's the correct usage of the command but for some reason when specifying "multiple":true in commands.json and we refresh the command's page a few times we get the above issue.

After multiple refreshes, I could not reproduce :/

Recreates for me (chromium and firefox). Apply following patch, run the site and go to: http://localhost:9292/commands/bitfield_ro

diff --git a/commands.json b/commands.json
index 4f40282..4fb49e0 100644
--- a/commands.json
+++ b/commands.json
@@ -278,7 +278,8 @@
         "type": [
           "type",
           "integer"
-        ]
+        ],
+       "multiple": true
       }
     ],
     "since": "6.2.0",

Ok, I see it, confirmed :)