Skip to content

Batch DNS refresh requests on host renames - #3181

Merged
gbrodman merged 1 commit into
google:masterfrom
gbrodman:dnsRefreshBatch
Aug 4, 2026
Merged

Batch DNS refresh requests on host renames#3181
gbrodman merged 1 commit into
google:masterfrom
gbrodman:dnsRefreshBatch

Conversation

@gbrodman

@gbrodman gbrodman commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Some hosts can have more than 100k domains linked to them so we probably don't want to insert all those entries at once.

As far as I'm aware this hasn't been an issue in practice, but we should still do it just in case.

Self assessment D.5 number 16


This change is Reviewable

@gbrodman
gbrodman requested a review from CydeWeys July 29, 2026 19:38

@CydeWeys CydeWeys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@CydeWeys made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on gbrodman).


core/src/main/java/google/registry/dns/RefreshDnsOnHostRenameAction.java line 77 at r1 (raw file):

  private void runDnsRefresh() {
    ImmutableSet<VKey<Domain>> linkedDomainKeys =
        tm().transact(

The code gets a decent bit simpler if you don't combine basic error checking in the same transaction as loading all the linked domain keys -- thoughts on doing it that way? Then you shouldn't need this new exception class or special exception handling. And considering how infrequently this is called, having a single additional transaction is a fair trade-off for simpler code.

Some hosts can have more than 100k domains linked to them so we probably
don't want to insert all those entries at once.

@gbrodman gbrodman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@gbrodman made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on CydeWeys).


core/src/main/java/google/registry/dns/RefreshDnsOnHostRenameAction.java line 77 at r1 (raw file):

Previously, CydeWeys (Ben McIlwain) wrote…

The code gets a decent bit simpler if you don't combine basic error checking in the same transaction as loading all the linked domain keys -- thoughts on doing it that way? Then you shouldn't need this new exception class or special exception handling. And considering how infrequently this is called, having a single additional transaction is a fair trade-off for simpler code.

yeah that's fair, one extra transaction isn't that big of a deal especially since we're batching to create more transactions anyway. Done.

@CydeWeys CydeWeys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@CydeWeys resolved 1 discussion.
Reviewable status: 0 of 3 files reviewed, all discussions resolved.

@CydeWeys CydeWeys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:lgtm:

@CydeWeys made 1 comment.
Reviewable status: 0 of 3 files reviewed, all discussions resolved.

@gbrodman
gbrodman added this pull request to the merge queue Aug 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 3, 2026
@gbrodman
gbrodman added this pull request to the merge queue Aug 4, 2026
Merged via the queue into google:master with commit 3474cd6 Aug 4, 2026
14 of 16 checks passed
@gbrodman
gbrodman deleted the dnsRefreshBatch branch August 4, 2026 03:32
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.

2 participants