Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ public EbeanLocalAccess(EbeanServer server, ServerConfig serverConfig, @Nonnull
_schemaEvolutionManager = createSchemaEvolutionManager(serverConfig);
_nonDollarVirtualColumnsEnabled = nonDollarVirtualColumnsEnabled;
validator = buildValidator(server, serverConfig);
// Pre-warm at construction time so the cache is hot before the first request,
// regardless of whether ensureSchemaUpToDate() is called by the service.
validator.registerAndPreWarm(getTableName(_entityType));
validator.registerAndPreWarm(getTestTableName(_entityType));
}

private static SchemaValidatorUtil buildValidator(EbeanServer server, ServerConfig serverConfig) {
Expand Down Expand Up @@ -135,9 +139,6 @@ public void configureOptionalForceIndex(@Nullable String indexName,

public void ensureSchemaUpToDate() {
_schemaEvolutionManager.ensureSchemaUpToDate();
// Pre-warm the shared cache for both the prod and test tables so the first request is never slow.
validator.registerAndPreWarm(getTableName(_entityType));
validator.registerAndPreWarm(getTestTableName(_entityType));
validateForceIndex();
}

Expand Down
Loading