Skip to content

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

Merged
mahjonp merged 1 commit intomasterfrom
fix_prepare_retry
Apr 1, 2021
Merged

tpcc: ignore the non-first Duplicated entry error#77
mahjonp merged 1 commit intomasterfrom
fix_prepare_retry

Conversation

@mahjonp
Copy link
Copy Markdown
Collaborator

@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
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
Copy Markdown

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