Title: [Order 02][P1] Fix async paged-query infinite loop when PageSize is zero · Issue #60 · NEventStore/NEventStore.Persistence.SQL · GitHub
Open Graph Title: [Order 02][P1] Fix async paged-query infinite loop when PageSize is zero · Issue #60 · NEventStore/NEventStore.Persistence.SQL
X Title: [Order 02][P1] Fix async paged-query infinite loop when PageSize is zero · Issue #60 · NEventStore/NEventStore.Persistence.SQL
Description: Priority order Order: 02 of 09 Priority: P1 correctness Problem Async paged reads can loop forever when the configured page size is 0 and the result set is empty. Evidence: src/NEventStore.Persistence.Sql/SqlDialects/CommonDbStatement.cs...
Open Graph Description: Priority order Order: 02 of 09 Priority: P1 correctness Problem Async paged reads can loop forever when the configured page size is 0 and the result set is empty. Evidence: src/NEventStore.Persiste...
X Description: Priority order Order: 02 of 09 Priority: P1 correctness Problem Async paged reads can loop forever when the configured page size is 0 and the result set is empty. Evidence: src/NEventStore.Persiste...
Opengraph URL: https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/60
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Order 02][P1] Fix async paged-query infinite loop when PageSize is zero","articleBody":"## Priority order\n\nOrder: 02 of 09\nPriority: P1 correctness\n\n## Problem\n\nAsync paged reads can loop forever when the configured page size is `0` and the result set is empty.\n\nEvidence:\n\n- `src/NEventStore.Persistence.Sql/SqlDialects/CommonDbStatement.cs:331`\n- Continuation condition is `while (Dialect.CanPage \u0026\u0026 recordsRead == PageSize)`.\n- `SqlPersistenceEngine` allows `PageSize == 0`, where zero represents infinite page size.\n\n## Impact\n\n- Empty async reads can hang for pageable dialects.\n- Affected APIs include checkpoint reads, bucket-scoped reads, and stream reads that call `ExecutePagedQueryAsync`.\n\n## Mandatory test-first workflow\n\n- Add tests first that reproduce or verify the issue before changing production code.\n- Include an async empty-result test with configured page size `0`.\n- Cover at least `GetFromAsync(0, observer, token)` and one bucket-scoped async read.\n- The test must fail or time out before the fix and complete after the fix.\n\n## Proposed action\n\n- Base continuation on the computed local `pageSize`.\n- Continue only when `pageSize \u003e 0 \u0026\u0026 recordsRead == pageSize`.\n\n## Acceptance criteria\n\n- Empty async reads complete when `PageSize == 0`.\n- Multi-page async reads still return ordered, complete results when `PageSize \u003e 0`.\n- Sync behavior is unchanged.\n\nSource: `docs/Project-Analysis-Issue-Drafts.md`.","author":{"url":"https://github.com/AGiorgetti","@type":"Person","name":"AGiorgetti"},"datePublished":"2026-06-11T09:20:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/60/NEventStore.Persistence.SQL/issues/60"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ba3735de-a066-86ad-2193-a4edf55f7fc9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1CC:FB596:FECB4D:16F0694:6A4E55C3 |
| html-safe-nonce | 3c6dd525e3f367d1a7f552c03ebe68f7060885927893b0fead97a3cede65517c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUNDOkZCNTk2OkZFQ0I0RDoxNkYwNjk0OjZBNEU1NUMzIiwidmlzaXRvcl9pZCI6IjcwMjEyMjgyMDE1ODI5NDE2MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 66a61a790ffba21edf9d4bed9f737c60ef61d0734921aaa95d3dc63fb95502a3 |
| hovercard-subject-tag | issue:4639061224 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NEventStore/NEventStore.Persistence.SQL/60/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e90fed83bb2e0ca4020588854ef745a71f15a09381c722bedc2126d720475f04/NEventStore/NEventStore.Persistence.SQL/issues/60 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e90fed83bb2e0ca4020588854ef745a71f15a09381c722bedc2126d720475f04/NEventStore/NEventStore.Persistence.SQL/issues/60 |
| og:image:alt | Priority order Order: 02 of 09 Priority: P1 correctness Problem Async paged reads can loop forever when the configured page size is 0 and the result set is empty. Evidence: src/NEventStore.Persiste... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AGiorgetti |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/NEventStore/NEventStore.Persistence.SQL git https://github.com/NEventStore/NEventStore.Persistence.SQL.git |
| octolytics-dimension-user_id | 4486767 |
| octolytics-dimension-user_login | NEventStore |
| octolytics-dimension-repository_id | 36130556 |
| octolytics-dimension-repository_nwo | NEventStore/NEventStore.Persistence.SQL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36130556 |
| octolytics-dimension-repository_network_root_nwo | NEventStore/NEventStore.Persistence.SQL |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f344f1eab54fc7dfc02d0d018cda7e158c3db65c |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width