Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#56415
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
fzzf678 authored and ti-chi-bot committed Oct 9, 2024
1 parent 116ffee commit 40ec632
Show file tree
Hide file tree
Showing 3 changed files with 520 additions and 5 deletions.
6 changes: 1 addition & 5 deletions executor/insert_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1113,11 +1113,7 @@ func (e *InsertValues) handleDuplicateKey(ctx context.Context, txn kv.Transactio
if handle == nil {
return false, nil
}
_, err = e.removeRow(ctx, txn, handle, r, true)
if err != nil {
return false, err
}
return false, nil
return e.removeRow(ctx, txn, handle, r, true)
}

// batchCheckAndInsert checks rows with duplicate errors.
Expand Down
26 changes: 26 additions & 0 deletions pkg/executor/test/loaddatatest/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "loaddatatest_test",
timeout = "short",
srcs = [
"load_data_test.go",
"main_test.go",
],
flaky = True,
race = "on",
shard_count = 12,
deps = [
"//pkg/config",
"//pkg/executor",
"//pkg/lightning/mydump",
"//pkg/meta/autoid",
"//pkg/sessionctx",
"//pkg/testkit",
"//pkg/util/dbterror/exeerrors",
"@com_github_stretchr_testify//require",
"@com_github_tikv_client_go_v2//tikv",
"@io_opencensus_go//stats/view",
"@org_uber_go_goleak//:goleak",
],
)
Loading

0 comments on commit 40ec632

Please sign in to comment.