fix(ebean-dao): re-warm schema cache at end of ensureSchemaUpToDate (#618 regression)#627
Merged
NatalliaUlashchick merged 1 commit intoJun 16, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #627 +/- ##
============================================
+ Coverage 66.86% 66.91% +0.05%
- Complexity 1886 1887 +1
============================================
Files 148 148
Lines 7274 7276 +2
Branches 881 881
============================================
+ Hits 4864 4869 +5
+ Misses 2025 2022 -3
Partials 385 385 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…618 regression) #615 pre-warmed SharedSchemaCache at the end of EbeanLocalAccess.ensureSchemaUpToDate(). #618 moved that pre-warm into the constructor (so it also runs for deploys that gate ensureSchemaUpToDate() off and migrate schema as a separate job) -- but it removed the post-evolution re-warm. For consumers that build their schema in-JVM at boot (i.e. that call ensureSchemaUpToDate(), e.g. integration tests / dev with skipSchemaUpdate=false), the constructor pre-warm now runs BEFORE the schema-evolution DDL, caching an empty/incomplete view that is pinned for the cache TTL. columnExists()/indexExists() then report missing columns/indexes, EbeanLocalAccess.batchGetUnion drops the aspect from its query, and reads silently return nothing -- surfacing in AIM ai-metadata-gms as 404s on aspect reads, wrong autofill defaults, dropped writes, and wrong snapshot/member counts. Restore the pre-warm at the end of ensureSchemaUpToDate() (after the evolution DDL is applied) while keeping #618's constructor pre-warm. The re-warm overwrites the stale entry with the complete, post-migration schema. It runs only where ensureSchemaUpToDate() is called (in-JVM schema build); deploys that gate it off (prod) are unaffected -- there the constructor pre-warm already sees a complete schema. Effectively recovers #615's behavior for that path without giving up #618. Adds an EbeanLocalAccessTest regression test that evolves the schema after construction and asserts ensureSchemaUpToDate() re-warms the shared cache (fails on the pre-fix behavior). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
20a2076 to
84de99a
Compare
mridul111998
approved these changes
Jun 15, 2026
mridul111998
pushed a commit
to mridul111998/datahub-gma
that referenced
this pull request
Jul 3, 2026
…inkedin#618 regression) (linkedin#627) linkedin#615 pre-warmed SharedSchemaCache at the end of EbeanLocalAccess.ensureSchemaUpToDate(). linkedin#618 moved that pre-warm into the constructor (so it also runs for deploys that gate ensureSchemaUpToDate() off and migrate schema as a separate job) -- but it removed the post-evolution re-warm. For consumers that build their schema in-JVM at boot (i.e. that call ensureSchemaUpToDate(), e.g. integration tests / dev with skipSchemaUpdate=false), the constructor pre-warm now runs BEFORE the schema-evolution DDL, caching an empty/incomplete view that is pinned for the cache TTL. columnExists()/indexExists() then report missing columns/indexes, EbeanLocalAccess.batchGetUnion drops the aspect from its query, and reads silently return nothing -- surfacing in AIM ai-metadata-gms as 404s on aspect reads, wrong autofill defaults, dropped writes, and wrong snapshot/member counts. Restore the pre-warm at the end of ensureSchemaUpToDate() (after the evolution DDL is applied) while keeping linkedin#618's constructor pre-warm. The re-warm overwrites the stale entry with the complete, post-migration schema. It runs only where ensureSchemaUpToDate() is called (in-JVM schema build); deploys that gate it off (prod) are unaffected -- there the constructor pre-warm already sees a complete schema. Effectively recovers linkedin#615's behavior for that path without giving up linkedin#618. Adds an EbeanLocalAccessTest regression test that evolves the schema after construction and asserts ensureSchemaUpToDate() re-warms the shared cache (fails on the pre-fix behavior). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#615 pre-warmed
SharedSchemaCacheat the end ofEbeanLocalAccess.ensureSchemaUpToDate(). #618 moved that pre-warm into the constructor (so it also runs for deploys that gateensureSchemaUpToDate()off and migrate schema as a separate job) — but it removed the post-evolution re-warm.For consumers that build their schema in-JVM at boot (i.e. that call
ensureSchemaUpToDate()— e.g. integration tests / dev deploys withskipSchemaUpdate=false), the constructor pre-warm now runs before the schema-evolution DDL. It caches an empty/incomplete view that is pinned for the cache TTL, socolumnExists()/indexExists()report missing columns/indexes,EbeanLocalAccess.batchGetUniondrops the aspect from its query, and reads silently return nothing.Fix: restore the pre-warm at the end of
ensureSchemaUpToDate()(after the evolution DDL is applied), while keeping #618's constructor pre-warm. The re-warm overwrites the stale entry with the complete, post-migration schema. It runs only whereensureSchemaUpToDate()is called (in-JVM schema build,skipSchemaUpdate=false); deploys that gate it off (prod) are unaffected — there the constructor pre-warm already sees the complete schema. Effectively recovers #615/0.6.183 behavior for that path without giving up #618's prod cold-start win.Testing Done
EbeanLocalAccessTest.testEnsureSchemaUpToDateReWarmsSharedSchemaCache: constructs an access (constructor pre-warm), adds a column after construction, then assertsensureSchemaUpToDate()re-warms the shared cache. Fails on the pre-fix behavior (verified — 2 failures across bothnonDollarVirtualColumnsEnabledfactory variants); passes with the fix.ensureSchemaUpToDate-exercising test classes pass:EbeanLocalAccessTest,InstrumentedEbeanLocalAccessTest,FlywaySchemaEvolutionManagerTest,FlywaySchemaEvolutionManagerTestWithoutServiceIdentifier.Checklist
🤖 Generated with Claude Code