Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor: report error in AddRecordLD function #13980

Merged
merged 3 commits into from
Dec 10, 2019
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: 1 addition & 0 deletions executor/load_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ func (e *LoadDataInfo) addRecordLD(row []types.Datum) (int64, error) {
h, err := e.addRecord(row)
if err != nil {
e.handleWarning(err)
return 0, err
}
return h, nil
}
Expand Down
2 changes: 2 additions & 0 deletions server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ func insertDataWithCommit(ctx context.Context, prevData, curData []byte, loadDat
if !reachLimit {
break
}
start := time.Now()
if err = loadDataInfo.Ctx.StmtCommit(); err != nil {
return nil, err
}
Expand All @@ -1080,6 +1081,7 @@ func insertDataWithCommit(ctx context.Context, prevData, curData []byte, loadDat
}
curData = prevData
prevData = nil
logutil.Logger(ctx).Info("commit one task finished", zap.Duration("commit time usage", time.Since(start)))
}
return prevData, nil
}
Expand Down