diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml index 405e27ab5..cd993cc2e 100644 --- a/config/checkstyle/suppressions.xml +++ b/config/checkstyle/suppressions.xml @@ -9,6 +9,4 @@ - - diff --git a/config/presubmits.py b/config/presubmits.py index 1a080553b..0d103ca34 100644 --- a/config/presubmits.py +++ b/config/presubmits.py @@ -109,15 +109,6 @@ PRESUBMITS = { "System.(out|err).println is only allowed in tools/ packages. Please " "use a logger instead.", - # ObjectifyService.register is restricted to main/ or AppEngineExtension. - PresubmitCheck( - r".*\bObjectifyService\.register", "java", { - "/build/", "/generated/", "node_modules/", "src/main/", - "AppEngineExtension.java" - }): - "ObjectifyService.register(...) is not allowed in tests. Please use " - "AppEngineExtension.register(...) instead.", - # PostgreSQLContainer instantiation must specify docker tag # TODO(b/204572437): Fix the pattern to pass DatabaseSnapshotTest.java PresubmitCheck( diff --git a/core/src/main/java/google/registry/config/RegistryConfig.java b/core/src/main/java/google/registry/config/RegistryConfig.java index e34cac4b8..390183133 100644 --- a/core/src/main/java/google/registry/config/RegistryConfig.java +++ b/core/src/main/java/google/registry/config/RegistryConfig.java @@ -1450,11 +1450,6 @@ public final class RegistryConfig { return CONFIG_SETTINGS.get().registryPolicy.defaultRegistrarWhoisServer; } - /** Returns the base retry duration that gets doubled after each failure within {@code Ofy}. */ - public static Duration getBaseOfyRetryDuration() { - return Duration.millis(CONFIG_SETTINGS.get().datastore.baseOfyRetryMillis); - } - /** Returns the default database transaction isolation. */ public static String getHibernateConnectionIsolation() { return CONFIG_SETTINGS.get().hibernate.connectionIsolation; diff --git a/core/src/main/java/google/registry/config/RegistryConfigSettings.java b/core/src/main/java/google/registry/config/RegistryConfigSettings.java index 00a098c44..7f04ae3ce 100644 --- a/core/src/main/java/google/registry/config/RegistryConfigSettings.java +++ b/core/src/main/java/google/registry/config/RegistryConfigSettings.java @@ -26,7 +26,6 @@ public class RegistryConfigSettings { public OAuth oAuth; public CredentialOAuth credentialOAuth; public RegistryPolicy registryPolicy; - public Datastore datastore; public Hibernate hibernate; public CloudSql cloudSql; public CloudDns cloudDns; @@ -108,11 +107,6 @@ public class RegistryConfigSettings { public boolean requireSslCertificates; } - /** Configuration for Cloud Datastore. */ - public static class Datastore { - public int baseOfyRetryMillis; - } - /** Configuration for Hibernate. */ public static class Hibernate { public String connectionIsolation; diff --git a/core/src/main/java/google/registry/config/files/default-config.yaml b/core/src/main/java/google/registry/config/files/default-config.yaml index fd6fa3d73..65c6fc6d6 100644 --- a/core/src/main/java/google/registry/config/files/default-config.yaml +++ b/core/src/main/java/google/registry/config/files/default-config.yaml @@ -182,11 +182,6 @@ registryPolicy: # should generally be true for production environments, for added security. requireSslCertificates: true -datastore: - # Milliseconds that Objectify waits to retry a Datastore transaction (this - # doubles after each failure). - baseOfyRetryMillis: 100 - hibernate: # Make 'SERIALIZABLE' the default isolation level to ensure correctness. # diff --git a/core/src/main/java/google/registry/config/files/nomulus-config-unittest.yaml b/core/src/main/java/google/registry/config/files/nomulus-config-unittest.yaml index 420c62c0e..5b8388fa8 100644 --- a/core/src/main/java/google/registry/config/files/nomulus-config-unittest.yaml +++ b/core/src/main/java/google/registry/config/files/nomulus-config-unittest.yaml @@ -10,10 +10,6 @@ registryPolicy: Disclaimer line 1. Line 2 is this 1. -datastore: - eppResourceIndexBucketsNum: 3 - baseOfyRetryMillis: 0 - caching: singletonCacheRefreshSeconds: 0 domainLabelCachingSeconds: 0 diff --git a/core/src/main/java/google/registry/model/EppResourceUtils.java b/core/src/main/java/google/registry/model/EppResourceUtils.java index 669112f15..2e523892b 100644 --- a/core/src/main/java/google/registry/model/EppResourceUtils.java +++ b/core/src/main/java/google/registry/model/EppResourceUtils.java @@ -165,8 +165,8 @@ public final class EppResourceUtils { // UpdateAutoTimestamp. For non-mutating uses (info, whois, etc.), this is equivalent to rolling // "now" forward to at least the last update on the resource, so that a read right after a write // doesn't appear stale. For mutating flows, if we had to roll now forward then the flow will - // fail when it tries to save anything via Ofy, since "now" is needed to be > the last update - // time for writes. + // fail when it tries to save anything, since "now" is needed to be > the last update time for + // writes. return Optional.of( cloneProjectedAtTime( resource, latestOf(now, resource.getUpdateTimestamp().getTimestamp()))); diff --git a/core/src/main/java/google/registry/model/reporting/HistoryEntry.java b/core/src/main/java/google/registry/model/reporting/HistoryEntry.java index 825f4e15d..00d7f3247 100644 --- a/core/src/main/java/google/registry/model/reporting/HistoryEntry.java +++ b/core/src/main/java/google/registry/model/reporting/HistoryEntry.java @@ -137,7 +137,7 @@ public abstract class HistoryEntry extends ImmutableObject @Column(name = "historyXmlBytes") byte[] xmlBytes; - /** The time the command occurred, represented by the ofy transaction time. */ + /** The time the command occurred, represented by the transaction time. */ @Column(nullable = false, name = "historyModificationTime") DateTime modificationTime; diff --git a/core/src/main/java/google/registry/tmch/LordnTaskUtils.java b/core/src/main/java/google/registry/tmch/LordnTaskUtils.java index f90a284d2..edce6c1cc 100644 --- a/core/src/main/java/google/registry/tmch/LordnTaskUtils.java +++ b/core/src/main/java/google/registry/tmch/LordnTaskUtils.java @@ -46,8 +46,8 @@ public final class LordnTaskUtils { /** Enqueues a task in the LORDN queue representing a line of CSV for LORDN export. */ public static void enqueueDomainTask(Domain domain) { tm().assertInTransaction(); - // This method needs to use ofy transactionTime as the Domain's creationTime because - // CreationTime isn't yet populated when this method is called during the resource flow. + // This method needs to use transactionTime as the Domain's creationTime because CreationTime + // isn't yet populated when this method is called during the resource flow. String tld = domain.getTld(); if (domain.getLaunchNotice() == null) { getQueue(QUEUE_SUNRISE).add(TaskOptions.Builder diff --git a/core/src/test/java/google/registry/tools/SetDatabaseMigrationStateCommandTest.java b/core/src/test/java/google/registry/tools/SetDatabaseMigrationStateCommandTest.java index 48f56b829..109861fbe 100644 --- a/core/src/test/java/google/registry/tools/SetDatabaseMigrationStateCommandTest.java +++ b/core/src/test/java/google/registry/tools/SetDatabaseMigrationStateCommandTest.java @@ -45,7 +45,6 @@ public class SetDatabaseMigrationStateCommandTest assertThat(jpaTm().transact(() -> jpaTm().loadSingleton(DatabaseMigrationStateSchedule.class))) .isEmpty(); runCommandForced("--migration_schedule=1970-01-01T00:00:00.000Z=DATASTORE_ONLY"); - // use a raw ofy call to check what's in the DB jpaTm() .transact( () ->