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

tpcc: ignore the non-first Duplicated entry error #77

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

mahjonp
Copy link
Contributor

@mahjonp mahjonp commented Apr 1, 2021

Signed-off-by: mahjonp junpeng.man@gmail.com

This PR ignores the non-first Duplicated entry error.

load to district in warehouse 672
exec statement error: invalid connection, may try again later...
[mysql] 2021/04/01 07:31:43 packets.go:36: unexpected EOF
...
exec statement error: Error 1062: Duplicate entry '672-1' for key 'PRIMARY', may try again later...
exec statement error: Error 1062: Duplicate entry '780-1' for key 'PRIMARY', may try again later...
load to district in warehouse 1088
load to warehouse in warehouse 1188
load to stock in warehouse 1188
exec statement error: Error 1062: Duplicate entry '672-1' for key 'PRIMARY', may try again later...
exec statement error: Error 1062: Duplicate entry '780-1' for key 'PRIMARY', may try again later...
load to district in warehouse 1006
load to warehouse in warehouse 1106
load to stock in warehouse 1106
panic: a fatal occurred when preparing data: load district at wareshouse 672 failed exec statement error: Error 1062: Duplicate entry '672-1' for key 'PRIMARY'

goroutine 120 [running]:
main.executeWorkload.func2(0xc000279320, 0xc64860, 0xc0002aaae0, 0xc6e800, 0xc0002aaa80, 0xb5633a, 0x7, 0x64, 0x47)
	/home/runner/work/go-tpc/go-tpc/cmd/go-tpc/misc.go:109 +0x2bb
created by main.executeWorkload
	/home/runner/work/go-tpc/go-tpc/cmd/go-tpc/misc.go:105 +0x195

@mahjonp mahjonp requested a review from cosven April 1, 2021 08:12
Signed-off-by: mahjonp <junpeng.man@gmail.com>
@mahjonp mahjonp force-pushed the fix_prepare_retry branch from 79c7a7a to 29c198c Compare April 1, 2021 08:14
@@ -91,8 +91,8 @@ func registerTpcc(root *cobra.Command) {
cmdPrepare.PersistentFlags().StringVar(&tpccConfig.OutputDir, "output-dir", "", "Output directory for generating file if specified")
cmdPrepare.PersistentFlags().StringVar(&tpccConfig.SpecifiedTables, "tables", "", "Specified tables for "+
"generating file, separated by ','. Valid only if output is set. If this flag is not set, generate all tables by default")
cmdPrepare.PersistentFlags().IntVar(&tpccConfig.PrepareReCommitCount, "retry-count", 50, "Retry count when errors occur")
cmdPrepare.PersistentFlags().DurationVar(&tpccConfig.PrepareReCommitDuration, "retry-duration", 10*time.Second, "The duration for each retry")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about deprecating this flag first?

@mahjonp mahjonp merged commit 78ad36a into master Apr 1, 2021
@mahjonp mahjonp deleted the fix_prepare_retry branch April 1, 2021 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants