Skip to content

Implement database schema for scheduled XAP launch#3095

Merged
CydeWeys merged 1 commit into
google:masterfrom
CydeWeys:expiry-access-period-db
Jun 23, 2026
Merged

Implement database schema for scheduled XAP launch#3095
CydeWeys merged 1 commit into
google:masterfrom
CydeWeys:expiry-access-period-db

Conversation

@CydeWeys

@CydeWeys CydeWeys commented Jun 22, 2026

Copy link
Copy Markdown
Member

This commit implements the database schema changes for the Expiry Access Period (XAP) launch configuration on TLDs. It represents the first step of a Two-PR deployment strategy, deploying the database schema changes in advance of the server logic.

Specifically, it replaces the expiry_access_period_enabled boolean column (originally introduced in PR #2804) with a new expiry_access_period_transitions hstore column.

Why we are making this change:
A basic boolean flag only allows an immediate, manual on/off toggle. To launch XAP on a TLD, registry operators would have to manually flip the flag at the exact launch time, which is operationally fragile and cannot be planned in advance. Refactoring this to an hstore-backed timed transition map (mapping Instant to ExpiryAccessPeriodMode) allows operators to schedule the XAP launch in advance via TLD YAML configurations. The registry will automatically transition the TLD to the ENABLED mode at the scheduled timestamp, aligning with how other scheduled TLD changes (like TLD states and EAP fee schedules) are managed.

Since the original boolean column was never mapped in Java (PR #2804 only added the database column), it is completely safe to drop it immediately in this migration.

TAG=agy
CONV=88271e71-e272-40e0-85f8-a075a423b7c2


This change is Reviewable

@CydeWeys CydeWeys requested a review from weiminyu June 22, 2026 22:27
@CydeWeys CydeWeys force-pushed the expiry-access-period-db branch from 54639c1 to 2ad6859 Compare June 23, 2026 14:45
This commit implements the database schema changes for the Expiry Access Period (XAP) launch configuration on TLDs. It represents the first step of a Two-PR deployment strategy, deploying the database schema changes in advance of the server logic.

Specifically, it replaces the `expiry_access_period_enabled` boolean column (originally introduced in PR google#2804) with a new `expiry_access_period_transitions` hstore column.

Why we are making this change:
A basic boolean flag only allows an immediate, manual on/off toggle. To launch XAP on a TLD, registry operators would have to manually flip the flag at the exact launch time, which is operationally fragile and cannot be planned in advance. Refactoring this to an hstore-backed timed transition map (mapping Instant to ExpiryAccessPeriodMode) allows operators to schedule the XAP launch in advance via TLD YAML configurations. The registry will automatically transition the TLD to the ENABLED mode at the scheduled timestamp, aligning with how other scheduled TLD changes (like TLD states and EAP fee schedules) are managed.

Since the original boolean column was never mapped in Java (PR google#2804 only added the database column), it is completely safe to drop it immediately in this migration.

To ensure backward compatibility with running servers (which are still executing the old Java code during the deployment transition), the new column is added as `NOT NULL` with a temporary `DEFAULT` constraint. This prevents constraint violations on inserts from old servers. A TODO has been left in the SQL migration to drop this default in a subsequent schema release once the Java changes have been deployed.

TAG=agy
CONV=88271e71-e272-40e0-85f8-a075a423b7c2
@CydeWeys CydeWeys force-pushed the expiry-access-period-db branch from 2ad6859 to 70cf784 Compare June 23, 2026 15:37

@weiminyu weiminyu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@weiminyu reviewed 5 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on CydeWeys).

@CydeWeys CydeWeys added this pull request to the merge queue Jun 23, 2026
Merged via the queue into google:master with commit e071f55 Jun 23, 2026
16 checks passed
@CydeWeys CydeWeys deleted the expiry-access-period-db branch June 23, 2026 20:44
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