func (do *Domain) SetLease(lease time.Duration) {
	if lease <= 0 {
		log.Warnf("[ddl] set the current lease:%v into a new lease:%v failed, so do nothing",
			do.ddl.GetLease(), lease)
		return
	}

	if do.loadCh == nil {
		log.Errorf("[ddl] set the current lease:%v into a new lease:%v failed, so do nothing",
			do.ddl.GetLease(), lease)
		return
	}

	do.checkCh <- lease
	do.loadCh <- lease
	// let ddl to reset lease too.
	do.ddl.SetLease(lease)
}
// SetLease will reset the lease time for online DDL change.
SetLease will reset the lease time for online DDL change.
// SetLease will reset the lease time for online DDL change .
func (do *Domain) SetLease(lease time.Duration) {
	if lease <= 0 {
		log.Warnf("[ddl] set the current lease:%v into a new lease:%v failed, so do nothing",
			do.ddl.GetLease(), lease)
		return
	}
	if do.loadCh == nil {
		log.Errorf("[ddl] set the current lease:%v into a new lease:%v failed, so do nothing",
			do.ddl.GetLease(), lease)
		return
	}
	do.checkCh <- lease
	do.loadCh <- lease
	do.ddl.SetLease(lease)
}
func ( do * Domain ) SetLease ( lease time . Duration ) { if lease <= 0 { log . Warnf ( " " , do . ddl . GetLease ( ) , lease ) return } if do . loadCh == nil { log . Errorf ( " " , do . ddl . GetLease ( ) , lease ) return } do . checkCh <- lease do . loadCh <- lease do . ddl . SetLease ( lease ) }
SetLease will reset the lease time for online DDL change.
SetLease will reset the lease time for online DDL change .
// let ddl to reset lease too.