- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit4c08ecd
committed
Fix assertion when decrementing eager scanning success and failure counters.
Previously, we asserted that the eager scan's success and failurecounters were positive before decrementing them. However, thisassumption was incorrect, as it's possible that some blocks havealready been eagerly scanned by the time eager scanning is disabled.This commit replaces the assertions with guards to handle thisscenario gracefully.With this change, we continue to allow read-ahead operations by theread stream that exceed the success and failure caps. While there is apossibility that overruns will trigger eager scans of additionalpages, this does not pose a practical concern as the overruns will notbe substantial and remain within an acceptable range.Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>Discussion:https://postgr.es/m/CAD21AoConf6tkVCv-=JhQJj56kYsDwo4jG5+WqgT+ukSkYomSQ@mail.gmail.com1 parentc53f3b9 commit4c08ecd
1 file changed
+17
-12
lines changedLines changed: 17 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1413 | 1413 |
| |
1414 | 1414 |
| |
1415 | 1415 |
| |
1416 |
| - | |
1417 |
| - | |
| 1416 | + | |
| 1417 | + | |
1418 | 1418 |
| |
1419 | 1419 |
| |
1420 | 1420 |
| |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
1421 | 1435 |
| |
1422 | 1436 |
| |
1423 | 1437 |
| |
| |||
1426 | 1440 |
| |
1427 | 1441 |
| |
1428 | 1442 |
| |
1429 |
| - | |
1430 |
| - | |
1431 |
| - | |
1432 |
| - | |
1433 |
| - | |
1434 |
| - | |
1435 | 1443 |
| |
1436 | 1444 |
| |
1437 |
| - | |
1438 |
| - | |
1439 |
| - | |
| 1445 | + | |
1440 | 1446 |
| |
1441 |
| - | |
1442 | 1447 |
| |
1443 | 1448 |
| |
1444 | 1449 |
| |
|
0 commit comments
Comments
(0)