Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion drainer/binlog_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func newBinlogItem(b *pb.Binlog, nodeID string) *binlogItem {
return itemp
}

//
func (b *binlogItem) SetJob(job *model.Job) {
b.job = job
}
4 changes: 2 additions & 2 deletions drainer/loopbacksync/loopbacksync.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ var CreateMarkTableDDL string = fmt.Sprintf("CREATE TABLE If Not Exists %s (%s b
// CreateMarkDBDDL is DDL to create the database of mark table.
var CreateMarkDBDDL = "create database IF NOT EXISTS retl;"

//LoopBackSync loopback sync info
// LoopBackSync loopback sync info
type LoopBackSync struct {
ChannelID int64
LoopbackControl bool
SyncDDL bool
}

//NewLoopBackSyncInfo return LoopBackSyncInfo objec
// NewLoopBackSyncInfo return LoopBackSyncInfo objec
func NewLoopBackSyncInfo(ChannelID int64, LoopbackControl, SyncDDL bool) *LoopBackSync {
l := &LoopBackSync{
ChannelID: ChannelID,
Expand Down
2 changes: 1 addition & 1 deletion drainer/sync/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion drainer/sync/oracle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion drainer/sync/syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion drainer/translator/oracle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
4 changes: 2 additions & 2 deletions pkg/loader/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func Merge(v bool) Option {
}
}

//DestinationDBType set destDBType option.
// DestinationDBType set destDBType option.
func DestinationDBType(t string) Option {
destDBType := DBTypeUnknown
if t == "oracle" {
Expand All @@ -209,7 +209,7 @@ func DestinationDBType(t string) Option {
}
}

//SetloopBackSyncInfo set loop back sync info of loader
// SetloopBackSyncInfo set loop back sync info of loader
func SetloopBackSyncInfo(loopBackSyncInfo *loopbacksync.LoopBackSync) Option {
return func(o *options) {
o.loopBackSyncInfo = loopBackSyncInfo
Expand Down
2 changes: 1 addition & 1 deletion pkg/loader/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func CreateDB(user string, password string, host string, port int, tls *tls.Conf
return CreateDBWithSQLMode(user, password, host, port, tls, nil, nil, time.Minute)
}

//CreateOracleDB create Oracle DB connection and return it
// CreateOracleDB create Oracle DB connection and return it
func CreateOracleDB(user string, password string, host string, port int, serviceName, connectString string) (db *gosql.DB, err error) {
loc, err := time.LoadLocation("Local")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func GetTidbPosition(db *sql.DB) (int64, error) {
return ts, nil
}

//GetOraclePosition return oracle scn
// GetOraclePosition return oracle scn
func GetOraclePosition(db *sql.DB) (int64, error) {
rows, err := db.Query("select dbms_flashback.get_system_change_number as current_scn from dual")
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion pump/storage/sorter.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func newItemGenerator(txnNum int32, maxLatency int64, fakeTxnPerNum int32) <-cha
return items
}

/// sorter
type sortItem struct {
start int64
commit int64
Expand Down
6 changes: 3 additions & 3 deletions pump/storage/vlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,9 @@ func (vlog *valueLog) scanRequests(start valuePointer, fn func(*request) error)

// scan visits binlogs in order starting from the specified position.
// There are two limitations to the usage of scan:
// 1. Binlogs added in new logFiles after scan starts are not visible, so don't assume
// that every single binlog added would be visited
// 2. If GC is running concurrently, logFiles may be closed and deleted, thus breaking the scanning.
// 1. Binlogs added in new logFiles after scan starts are not visible, so don't assume
// that every single binlog added would be visited
// 2. If GC is running concurrently, logFiles may be closed and deleted, thus breaking the scanning.
func (vlog *valueLog) scan(start valuePointer, fn func(vp valuePointer, record *Record) error) error {
vlog.gcLock.Lock()
defer vlog.gcLock.Unlock()
Expand Down