Feature/fix pool pagination tenant - #1044
Merged
Mac-5 merged 5 commits intoJul 28, 2026
Merged
Conversation
…z#988) Prevent integer overflow in offset calculation by validating page against u32::MAX / page_size in PaginationParams::new(). Defends against client-controlled DoS attacks via large page numbers in paginated queries.
Call evict_stale_locked() before returning idle connection count to ensure metrics accurately reflect available (non-stale) idle connections rather than reporting them indefinitely until the next acquire() call.
…bridgez#987) Add id DESC secondary sort key to ORDER BY clause to provide deterministic ordering when multiple transactions share the same created_at timestamp. Prevents row skipping and duplication from OFFSET/LIMIT pagination drift.
…pse-bridgez#986) Add tenant_id field to Transaction domain struct and update repository to include it in INSERT and SELECT queries. Allows tenant-aware row-level security policies to be enforced on transaction inserts.
|
@Saboleee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes 4 related bugs affecting connection pool metrics, pagination stability, and tenant isolation:
Changes
#988 — PaginationParams integer overflow in offset calculation
#985 — idle_count() reports stale connections as available indefinitely
#987 — Transaction list pagination skips and duplicates rows due to ties
#986 — PostgresTransactionRepository::insert() incompatible with tenant isolation RLS
Notes
Closes #985, Closes #986, Closes #987, Closes #988