Repository navigation
Commit 0bbb581
fix(client): terminate scan iterators when the cursor is a Buffer (#3428)
The six `*Iterator` helpers on the client compared the reply cursor
against the string `'0'`. Under a Blob String type mapping the cursor
comes back as a Buffer, which never equals `'0'`, so every iterator
scanned the keyspace forever instead of stopping — and re-issuing SCAN
with a `Buffer('0')` cursor restarts the iteration, so the loop never
makes progress toward an exit either.
Compare by string value, matching the guard the Sentinel `scanIterator`
already carries for the same reason.
Related to #2879.
Signed-off-by: Kush Zingade <[email protected]>
Co-authored-by: Kush Zingade <[email protected]>1 parent 4f2935a commit 0bbb581
2 files changed
Lines changed: 43 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1054 | 1089 | | |
1055 | 1090 | | |
1056 | 1091 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2024 | 2024 | | |
2025 | 2025 | | |
2026 | 2026 | | |
2027 | | - | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
2028 | 2030 | | |
2029 | 2031 | | |
2030 | 2032 | | |
| |||
2037 | 2039 | | |
2038 | 2040 | | |
2039 | 2041 | | |
2040 | | - | |
| 2042 | + | |
2041 | 2043 | | |
2042 | 2044 | | |
2043 | 2045 | | |
| |||
2050 | 2052 | | |
2051 | 2053 | | |
2052 | 2054 | | |
2053 | | - | |
| 2055 | + | |
2054 | 2056 | | |
2055 | 2057 | | |
2056 | 2058 | | |
| |||
2063 | 2065 | | |
2064 | 2066 | | |
2065 | 2067 | | |
2066 | | - | |
| 2068 | + | |
2067 | 2069 | | |
2068 | 2070 | | |
2069 | 2071 | | |
| |||
2076 | 2078 | | |
2077 | 2079 | | |
2078 | 2080 | | |
2079 | | - | |
| 2081 | + | |
2080 | 2082 | | |
2081 | 2083 | | |
2082 | 2084 | | |
| |||
2089 | 2091 | | |
2090 | 2092 | | |
2091 | 2093 | | |
2092 | | - | |
| 2094 | + | |
2093 | 2095 | | |
2094 | 2096 | | |
2095 | 2097 | | |
| |||
0 commit comments