diff --git a/ddl/ddl.go b/ddl/ddl.go index 2aeb5d8a15..43649115af 100644 --- a/ddl/ddl.go +++ b/ddl/ddl.go @@ -65,10 +65,14 @@ type ddl struct { store kv.Storage meta *meta.Meta // schema lease seconds. - lease int - uuid string - jobCh chan struct{} - jobDoneCh chan struct{} + lease int + uuid string + jobCh chan struct{} + jobDoneCh chan struct{} + // reOrgDoneCh is for re-orgnization, if the re-orgnization job is done, + // we will use this channel to notify outer. + // TODO: now we use goroutine to simulate re-orgnization jobs, later we may + // use a persistent job list. reOrgDoneCh chan error } diff --git a/ddl/reorg.go b/ddl/reorg.go index c8d8903d2a..f0856acaa1 100644 --- a/ddl/reorg.go +++ b/ddl/reorg.go @@ -24,6 +24,7 @@ import ( var _ context.Context = &reOrgContext{} +// reOrgContext implements context.Context interface for re-orgnization use. type reOrgContext struct { store kv.Storage