Commit 0988a46
fix: skip 75ms retry when store is empty (Bug 2) (#582)
Empty store: no write-ahead lag to wait for, so skip the retry
sleep entirely. countRows() is O(1) metadata op — negligible cost.
Logic: if results.length === 0 AND store.count() === 0 → return
empty immediately, no sleep.
Fixes Bug 2 from community code audit.
Co-authored-by: Charon <charon@openclaw.ai>1 parent 6bd4b57 commit 0988a46
2 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
447 | 453 | | |
448 | 454 | | |
449 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
181 | 187 | | |
182 | 188 | | |
183 | 189 | | |
| |||
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
213 | | - | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
575 | 581 | | |
576 | 582 | | |
577 | 583 | | |
578 | | - | |
| 584 | + | |
579 | 585 | | |
580 | 586 | | |
581 | 587 | | |
| |||
1079 | 1085 | | |
1080 | 1086 | | |
1081 | 1087 | | |
1082 | | - | |
| 1088 | + | |
1083 | 1089 | | |
1084 | 1090 | | |
1085 | 1091 | | |
| |||
1221 | 1227 | | |
1222 | 1228 | | |
1223 | 1229 | | |
1224 | | - | |
| 1230 | + | |
1225 | 1231 | | |
1226 | 1232 | | |
1227 | 1233 | | |
| |||
2142 | 2148 | | |
2143 | 2149 | | |
2144 | 2150 | | |
2145 | | - | |
| 2151 | + | |
2146 | 2152 | | |
2147 | 2153 | | |
2148 | 2154 | | |
| |||
0 commit comments