code: func NewDomain(store kv.Storage, ddlLease time.Duration, statsLease time.Duration, factory pools.Factory) *Domain {
  	capacity := 200 // capacity of the sysSessionPool size
  	return &Domain{
  		store:           store,
  		SchemaValidator: NewSchemaValidator(ddlLease),
  		exit:            make(chan struct{}),
  		sysSessionPool:  newSessionPool(capacity, factory),
  		statsLease:      statsLease,
  		infoHandle:      infoschema.NewHandle(store),
  		slowQuery:       newTopNSlowQueries(30, time.Hour*24*7, 500),
  	}
  }
docs: // NewDomain creates a new domain. Should not create multiple domains for the same store.