Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Little-Wallace <[email protected]>
  • Loading branch information
Little-Wallace committed Nov 3, 2021
1 parent 8503156 commit c5bc67a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
3 changes: 2 additions & 1 deletion dm/cmd/dm-worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func main() {
lg, r, _ := globalLog.InitLogger(conf)
lg = lg.With(zap.String("component", "ddl tracker"))
globalLog.ReplaceGlobals(lg, r)
lightningLog.SetAppLogger(log.L().Logger)
lightningLogger := lg.With(zap.String("component", "lightning"))
lightningLog.SetAppLogger(lightningLogger)

utils.PrintInfo("dm-worker", func() {
log.L().Info("", zap.Stringer("dm-worker config", cfg))
Expand Down
26 changes: 11 additions & 15 deletions dm/loader/lightning.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,25 @@ import (
"strings"
"sync"

"github.com/pingcap/ticdc/dm/dm/config"
"github.com/pingcap/ticdc/dm/dm/pb"
"github.com/pingcap/ticdc/dm/dm/unit"
"github.com/pingcap/ticdc/dm/pkg/binlog"
"github.com/pingcap/ticdc/dm/pkg/conn"
tcontext "github.com/pingcap/ticdc/dm/pkg/context"
"github.com/pingcap/ticdc/dm/pkg/log"
"github.com/pingcap/ticdc/dm/pkg/utils"

"github.com/docker/go-units"
"github.com/pingcap/failpoint"
"github.com/pingcap/tidb-tools/pkg/dbutil"
"github.com/pingcap/tidb/br/pkg/lightning"
"github.com/pingcap/tidb/br/pkg/lightning/common"
lcfg "github.com/pingcap/tidb/br/pkg/lightning/config"
"github.com/pingcap/tidb/parser/mysql"

"github.com/docker/go-units"
"go.etcd.io/etcd/clientv3"
"go.uber.org/atomic"
"go.uber.org/zap"

"github.com/pingcap/ticdc/dm/dm/config"
"github.com/pingcap/ticdc/dm/dm/pb"
"github.com/pingcap/ticdc/dm/dm/unit"
"github.com/pingcap/ticdc/dm/pkg/binlog"
"github.com/pingcap/ticdc/dm/pkg/conn"
tcontext "github.com/pingcap/ticdc/dm/pkg/context"
"github.com/pingcap/ticdc/dm/pkg/log"
"github.com/pingcap/ticdc/dm/pkg/utils"
)

const (
Expand Down Expand Up @@ -124,10 +123,7 @@ func (l *LightningLoader) Init(ctx context.Context) (err error) {
if err != nil {
return err
}
if toCfg.To.Session == nil {
toCfg.To.Session = make(map[string]string)
}
toCfg.To.Session["time_zone"] = "+00:00"
config.AdjustTargetDBTimeZone(&toCfg.To)
l.toDB, l.toDBConns, err = createConns(tctx, toCfg, 1)
return err
}
Expand Down
1 change: 0 additions & 1 deletion dm/tests/lightning_load_task/conf/dm-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: load_task1
task-mode: all
is-sharding: false
meta-schema: "dm_meta"
# enable-heartbeat: true
heartbeat-update-interval: 1
heartbeat-report-interval: 1

Expand Down

0 comments on commit c5bc67a

Please sign in to comment.