Commit d0028da
fix(storage): filter expired rows in PostgreSQL keys_in_range() (#5712)
# What does this PR do?
`keys_in_range()` was missing the expiration filter that `get()` and
`values_in_range()` already apply, causing it to return stale keys that
would resolve to nothing via `get()`. This adds the same `(expiration IS
NULL OR expiration > NOW())` predicate and `ORDER BY key` for
consistency with `values_in_range()`.
Closes #5699
## Test Plan
1. Pre-commit checks pass on the changed file:
```
uv run pre-commit run --files src/ogx/core/storage/kvstore/postgres/postgres.py
```
All hooks passed.
2. Verified the query now matches the structure of `values_in_range()`
(same WHERE clause, same ORDER BY).
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e27b39d commit d0028da
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
| |||
0 commit comments