From 9c14e9488555c8c26fb41ad4fab713b6f6cf73fa Mon Sep 17 00:00:00 2001 From: siddontang Date: Tue, 27 Oct 2015 10:23:24 +0800 Subject: [PATCH] ddl: Address comment. --- ddl/ddl.go | 12 ++++++++---- ddl/reorg.go | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) 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