Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhaowu committed Oct 15, 2018
1 parent 8a77101 commit de7a3d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@ func (c *CursorConfig) NewCursor(table *schema.Table, startPk, maxPk uint64) *Cu

// returns a new Cursor with an embedded copy of itself
func (c *CursorConfig) NewCursorWithoutRowLock(table *schema.Table, startPk, maxPk uint64) *Cursor {
return &Cursor{
CursorConfig: *c,
Table: table,
MaxPrimaryKey: maxPk,
RowLock: false,
lastSuccessfulPrimaryKey: startPk,
}
cursor := NewCursor(table, startPk, maxPk)
cursor.RowLock = false
return cursor
}

type Cursor struct {
Expand Down
2 changes: 1 addition & 1 deletion data_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (d *DataIterator) Run() {
d.targetPKs = &sync.Map{}

// If a state tracker is not provided, then the caller doesn't care about
// tracking state. However, some methods are still useful so we use initialize
// tracking state. However, some methods are still useful so we initialize
// a minimal local instance.
if d.StateTracker == nil {
d.StateTracker = NewStateTracker(0)
Expand Down
2 changes: 1 addition & 1 deletion ferry.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (f *Ferry) NewBinlogStreamer() *BinlogStreamer {
}
}

// Even tho this function is identical to NewBinlogStreamer, it is here
// Even though this function is identical to NewBinlogStreamer, it is here
// for consistency so it will lead to less confusion.
func (f *Ferry) NewBinlogStreamerWithoutStateTracker() *BinlogStreamer {
return f.NewBinlogStreamer()
Expand Down

0 comments on commit de7a3d3

Please sign in to comment.