Skip to content

Commit

Permalink
domain: use the KV timeout read feature to mitigate the slow meta reg…
Browse files Browse the repository at this point in the history
…ion issue (#48125) (#50623)

close #48124
  • Loading branch information
ti-chi-bot authored Jan 24, 2024
1 parent 8aa2293 commit 83df900
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ func (do *Domain) loadInfoSchema(startTS uint64) (infoschema.InfoSchema, bool, i
infoschema_metrics.LoadSchemaDurationTotal.Observe(time.Since(beginTime).Seconds())
}()
snapshot := do.store.GetSnapshot(kv.NewVersion(startTS))
// Using the KV timeout read feature to address the issue of potential DDL lease expiration when
// the meta region leader is slow.
snapshot.SetOption(kv.TiKVClientReadTimeout, uint64(3000)) // 3000ms.
m := meta.NewSnapshotMeta(snapshot)
neededSchemaVersion, err := m.GetSchemaVersionWithNonEmptyDiff()
if err != nil {
Expand Down

0 comments on commit 83df900

Please sign in to comment.