Skip to content
Closed
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
9 changes: 8 additions & 1 deletion go/vt/vttablet/tabletserver/schema/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,14 @@ func (se *Engine) EnableHistorian(enabled bool) error {
// The includeStats argument controls whether table size statistics should be
// emitted, as they can be expensive to calculate for a large number of tables
func (se *Engine) Reload(ctx context.Context) error {
return se.ReloadAt(ctx, replication.Position{})
pos := replication.Position{}
ctxWithoutCancel := context.WithoutCancel(ctx)
time.AfterFunc(time.Minute, func() {
ctx, cancel := context.WithTimeout(ctxWithoutCancel, time.Minute)
defer cancel()
se.ReloadAtEx(ctx, pos, true)
})
return se.ReloadAtEx(ctx, pos, false)
}

// ReloadAt reloads the schema info from the db.
Expand Down