Skip to content

fix(ebean-dao): move SharedSchemaCache pre-warm to EbeanLocalAccess c…#619

Open
ybz1013 wants to merge 1 commit into
linkedin:masterfrom
ybz1013:yanbzhao/prewarm-on-construction
Open

fix(ebean-dao): move SharedSchemaCache pre-warm to EbeanLocalAccess c…#619
ybz1013 wants to merge 1 commit into
linkedin:masterfrom
ybz1013:yanbzhao/prewarm-on-construction

Conversation

@ybz1013
Copy link
Copy Markdown
Contributor

@ybz1013 ybz1013 commented May 6, 2026

…onstructor

ensureSchemaUpToDate() is LiX'd off in some services (e.g. MGA), so pre-warming was never firing in production. Moving registerAndPreWarm() into the constructor guarantees it runs at bean creation time regardless of whether ensureSchemaUpToDate() is called.

Summary

  • Moves SharedSchemaCache pre-warming from ensureSchemaUpToDate() into the EbeanLocalAccess
    constructor so it fires at bean creation time regardless of whether ensureSchemaUpToDate() is called
  • Root cause: ensureSchemaUpToDate() is LiX'd off in MGA so pre-warming was never executing in production
  • No behavior change for callers that do invoke ensureSchemaUpToDate() — schema evolution DDL still
    runs there; only the cache warm-up moved to constructor

Testing Done

  • SharedSchemaCacheTest (14 tests) — pass
  • EbeanLocalAccessTest — pass
  • EbeanLocalAccessTestWithoutServiceIdentifier — pass

Checklist

  • Conforms to Commit Message Format

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)

  • Links to related issues (if applicable)

  • Docs related to the changes have been added/updated (if applicable)

…onstructor

ensureSchemaUpToDate() is LiX'd off in some services (e.g. MGA), so
pre-warming was never firing in production. Moving registerAndPreWarm()
into the constructor guarantees it runs at bean creation time regardless
of whether ensureSchemaUpToDate() is called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant