You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
When switching schema cache v1/v2, we would clear the whole schema cache.
if isV1V2Switch && schemaTs > 0 {
// Reset the whole info cache to avoid co-existing of both v1 and v2, causing the memory usage doubled.
fn := do.infoCache.Upsert(is, schemaTs)
do.deferFn.add(fn, time.Now().Add(10*time.Minute))
} else {
do.infoCache.Insert(is, schemaTs)
}
After getting the snapshot schema, the only schema in the cache is the snapshot schema, which is not the newest schema.
Then domain.Infoschma is wrong.
// InfoSchema gets the latest information schema from domain.
func (do *Domain) InfoSchema() infoschema.InfoSchema {
return do.infoCache.GetLatest()
}