Skip to content

Conversation

@peterthomassen
Copy link
Member

@peterthomassen peterthomassen commented Jan 12, 2026

About the first commit:

  • During high concurrency, we sometimes end up sending PATCH requests with duplicate records to nslord, who rejects them, causing a 500 response. In all instances observed in nslord pcaps (correlated with www logs), there were to updates on the same domain within a fraction of a second.
  • This happens when the second request's serializer fetches the RRset contents from the database before the first request writes them, so two rows get written.
  • PDNSChangeTracker then constructs the nslord update request from the database, with duplicate records.
  • This change makes this fail earlier, throwing a psycopg.errors.ExclusionViolation exception. Django turns this into an IntegrityError, which our exception handler turns into a 409 response.
  • A better approach would be to lock the RRset's records for reading while a corresponding write transaction is pending. However, that will cause processes to hang, which might lead to other problems. Also, I'm not sure how to do it. I'd thus like to see if this fix suffices.

Other commits handle various routine work.

@peterthomassen peterthomassen force-pushed the 20260112_unique_records branch 2 times, most recently from f8b78a0 to d6b68e8 Compare January 13, 2026 00:01
peterthomassen and others added 5 commits January 21, 2026 11:07
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).

Updates `actions/checkout` from 4 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
@peterthomassen peterthomassen force-pushed the 20260112_unique_records branch from 5a02ba0 to 6a4ae93 Compare January 21, 2026 10:07
Copy link
Contributor

@nils-wisiol nils-wisiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@peterthomassen peterthomassen merged commit 6a4ae93 into main Jan 21, 2026
5 checks passed
@peterthomassen peterthomassen deleted the 20260112_unique_records branch January 21, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants