Skip to content

Commit

Permalink
binlog: fix bug in load data (#7242)
Browse files Browse the repository at this point in the history
Cherry-pick #7074
  • Loading branch information
coocood authored Aug 2, 2018
1 parent c3ec81d commit c04b9a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ func (cc *clientConn) handleLoadData(ctx context.Context, loadDataInfo *executor
}
return errors.Trace(err)
}
return errors.Trace(txn.Commit(sessionctx.SetConnID2Ctx(ctx, loadDataInfo.Ctx)))
return errors.Trace(cc.ctx.CommitTxn(sessionctx.SetConnID2Ctx(ctx, loadDataInfo.Ctx)))
}

// handleLoadStats does the additional work after processing the 'load stats' query.
Expand Down
1 change: 1 addition & 0 deletions store/tikv/2pc.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ func (c *twoPhaseCommitter) writeFinishBinlog(tp binlog.BinlogType, commitTS int
binInfo := c.txn.us.GetOption(kv.BinlogInfo).(*binloginfo.BinlogInfo)
binInfo.Data.Tp = tp
binInfo.Data.CommitTs = commitTS
binInfo.Data.PrewriteValue = nil
go func() {
err := binInfo.WriteBinlog(c.store.clusterID)
if err != nil {
Expand Down

0 comments on commit c04b9a7

Please sign in to comment.