Conversation
Add GetRecordsByNames() to DNSRepository interface and PostgresRepository implementation to fetch records for multiple names in a single query. This eliminates the N+1 query problem when fetching glue A records for authority section NS records.
Update authority section handling to collect all NS host targets first, then batch-fetch all glue A records in a single GetRecordsByNames call. Reduces N DB queries to 1 query regardless of NS record count.
Implement GetRecordsByNames in all test mock repositories to satisfy the updated DNSRepository interface.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Review rate limit: 0/1 reviews remaining, refill in 55 minutes and 37 seconds.Comment |
Summary
GetRecordsByNames()toDNSRepositoryinterface for batch fetching records by multiple namesGetRecordsByNames()inPostgresRepositoryusingWHERE LOWER(name) IN (...)queryChanges
internal/adapters/repository/postgres.go— newGetRecordsByNames()methodinternal/core/ports/ports.go— interface additioninternal/dns/server/server.go— batch glue lookups