Skip to content

Conversation

@sundb
Copy link
Collaborator

@sundb sundb commented Sep 4, 2024

After #13499, If the length set by addReplySetLen() does not match the actual number of elements in the reply, it will cause protocol broken and result in the client hanging.

failed CI: https://github.com/redis/redis/actions/runs/10692581371

@sundb
Copy link
Collaborator Author

sundb commented Sep 4, 2024

benchmark

taskset -c 10 ./src/redis-server --save ""

data prepration

SADD set:100 vyoomgwuzv xamjodnbpf ewomnmugfa ljcgdooafo pcxdhdjwnf djetcyfxuc licotqplim alqlzsvuuz ijsmoyesvd whmotknaff rkaznetutk ksqpdywgdd gorgpnnqwr gekntrykfh rjkknoigmu luemuetmia gxephxbdru ncjfckgkcl hhjclfbbka cgoeihlnei zwnitejtpg upodnpqenn mibvtmqxcy htvbwmfyic rqvryfvlie nxcdcaqgit gfdqdrondm lysbgqqfqw nxzsnkmxvi nsxaigrnje cwaveajmcz xsepfhdizi owtkxlzaci agsdggdghc tcjvjofxtd kgqrovsxce ouuybhtvyb ueyrvldzwl vpbkvwgxsf pytrnqdhvs qbiwbqiubb ssjqrsluod urvgxwbiiz ujrxcmpvsq mtccjerdon xczfmrxrja imyizmhzjk oguwnmniig mxwgdcutnb pqyurbvifk ccagtnjilc mbxohpancs lgrkndhekf eqlgkwosie jxoxtnzujs lbtpbknelm ichqzmiyot mbgehjiauu aovfsvbwjg nmgxcctxpn vyqqkuszzh rojeolnopp ibhohmfxzt qbyhorvill nhfnbxqgol wkbasfyzqz mjjuylgssm imdqxmkzdj oapbvnisyq bqntlsaqjb ocrcszcznp hhniikmtsx hlpdstpvzw wqiwdbncmt vymjzlzqcn hhjchwjlmc ypfeltycpy qjyeqcfhjj uapsgmizgh owbbdezgxn qrosceblyo sahqeskveq dapacykoah wvcnqbvlnf perfwnpvkl ulbrotlhze fhuvzpxjbc holjcdpijr onzjrteqmu pquewclxuy vpmpffdoqz eouliovvra vxcbagyymm jekkafodvk ypekeuutef dlbqcynhrn erxulvebrj qwxrsgafzy dlsjwmqzhx exvhmqxvvp
taskset -c 16-20 memtier_benchmark --command="SMEMBERS set:100"  --hide-histogram --test-time 180

unstable (de7f2f8):

ALL STATS
====================================================================================================
Type           Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
----------------------------------------------------------------------------------------------------
Smemberss    114063.61         1.74952         1.71900         3.42300         3.90300    193484.85 
Totals       114063.61         1.74952         1.71900         3.42300         3.90300    386969.70

this PR (-0.2%):

====================================================================================================
Type           Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
----------------------------------------------------------------------------------------------------
Smemberss    113766.89         1.75415         1.71900         3.43900         3.96700    192981.52 
Totals       113766.89         1.75415         1.71900         3.43900         3.96700    385963.05

@sundb sundb merged commit 74609d4 into redis:unstable Sep 4, 2024
@sundb sundb deleted the smembers_len_reply branch September 4, 2024 09:35
funny-dog pushed a commit to funny-dog/redis that referenced this pull request Sep 17, 2025
After redis#13499, If the length set by
`addReplySetLen()` does not match the actual number of elements in the
reply, it will cause protocol broken and result in the client hanging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants