Skip to content

Commit

Permalink
This is an automated cherry-pick of #59098
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
Leavrth authored and ti-chi-bot committed Jan 22, 2025
1 parent dc3fc90 commit d70cc07
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions domain/schema_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ func (s *schemaValidator) Update(leaseGrantTS uint64, oldVer, currVer int64, cha
}
}

<<<<<<< HEAD:domain/schema_validator.go
=======
func (s *schemaValidator) IsLeaseExpired() bool {
s.mux.Lock()
defer s.mux.Unlock()
return time.Now().After(s.latestSchemaExpire)
}

>>>>>>> ddf8c846dfc (br: fix data race for the function IsLeaseExpired (#59098)):pkg/domain/schema_validator.go
// isRelatedTablesChanged returns the result whether relatedTableIDs is changed
// from usedVer to the latest schema version.
// NOTE, this function should be called under lock!
Expand Down

0 comments on commit d70cc07

Please sign in to comment.