Handle exotic partition bounds and refuse DEFAULT partitions - #70
Conversation
|
Warning Review limit reached
Next review available in: 31 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughChangesThe archiver now parses and renders PostgreSQL timestamps across BC-era, wide-future, infinite, and open partition bounds. Registration rejects DEFAULT partitions, documentation describes these rules, and tiered E2E coverage validates archiver completion and cutover. Exotic partition bounds
Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/sqlutil/sqlutil.go`:
- Around line 25-30: Update Timestamp so it converts t to UTC before checking
the year, then use that same UTC value for both the positive-year and BC
formatting branches. This ensures the era is determined from the rendered UTC
instant.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b0b42e2b-67be-4f9b-a3e2-33225e11af91
📒 Files selected for processing (12)
ci/journey.shcmd/archiver/main.godocs/usage.mdinternal/partcfg/commands.gointernal/partcfg/commands_test.gointernal/partition/boundary.gointernal/partition/boundary_test.gointernal/partition/partition.gointernal/partition/partition_test.gointernal/sqlutil/sqlutil.gointernal/sqlutil/sqlutil_test.gointernal/view/view.go
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 9 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
9908d89 to
8f26c6d
Compare
If the archiver couldn't read a partition bound, it aborted the run for tables that came after it alphabetically. Now the bound parser covers PG's full date range, including the BC era suffix and years wider than four digits, and open edges (MINVALUE, MAXVALUE, infinity) resolve to timestamps outside that range,
which no real bound can equal, so the existing comparisons hold unchanged. Timestamp rendering consolidated into one helper in sqlutil.
DEFAULT partitions are refused at registration. Their rows can never tier or expire, and PostgreSQL refuses concurrent detach of every partition of a table that has one, which is how we expire partitions.
Closes #68
Closes #69