Commit 43f7f8d
authored
fix: use wildcard query when Redis index value is empty (#2069)
* fix: use wildcard query when Redis index value is empty
When searching Redis with an empty filter, the query was generating
`@nl_state:{ }` which causes a syntax error at offset 10. This fix
uses `*` (match all) when the sanitized field is empty.
Also updates the test mock to handle wildcard queries and skip entries
without version fields (e.g., those created via HSET).
Fixes: Syntax error at offset 10 near state
* complete merge to comply with CI
* fix: resolve merge conflict in search_by_index_prefix
Merged main into fix-redis-query-syntax branch and resolved conflict
in the search_by_index_prefix method to work with RecoverablePool.
Changes:
- Extract Client from ClientWithPermit using client.client.clone()
- Pass sanitized_field as parameter to closure for proper ownership
- Maintain wildcard query fix (*) for empty filter values
- Maintain input sanitization security
,1 parent 14b2cc6 commit 43f7f8d
File tree
2 files changed
+70
-46
lines changed- nativelink-scheduler/tests
- nativelink-store/src
2 files changed
+70
-46
lines changedLines changed: 33 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | 225 | | |
234 | 226 | | |
235 | 227 | | |
236 | 228 | | |
237 | 229 | | |
238 | 230 | | |
239 | | - | |
240 | | - | |
241 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
242 | 238 | | |
243 | 239 | | |
244 | | - | |
| 240 | + | |
245 | 241 | | |
246 | | - | |
| 242 | + | |
247 | 243 | | |
248 | 244 | | |
249 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
250 | 268 | | |
| 269 | + | |
251 | 270 | | |
252 | 271 | | |
253 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1328 | 1328 | | |
1329 | 1329 | | |
1330 | 1330 | | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1351 | 1360 | | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
1364 | 1369 | | |
1365 | 1370 | | |
1366 | 1371 | | |
| |||
0 commit comments