-
Notifications
You must be signed in to change notification settings - Fork 262
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
[opt] : when composite primary key has a column that is auto-incr, and this column does not specify a value, no dup check is needed #15810
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this PR, I have a concern on correctness.
If we disable the dup check, and someone insert a row with a value, later, auto_incr reuse that value, we will have a data corruption.
if we allow user insert an id value, we invalidate all id caches and start from a value that is bigger than this id. We have already done this and it was confirmed by @zhangxu19830126 |
We can supplement relevant bvt test cases |
Now,
|
我理解这里可能有风险的根本原因是
上面这个事情需要有一个足够强的测试去覆盖这个场景, 目前没有, 所以当这里触发 学习了一下 matrixone/pkg/incrservice/column_cache.go Line 548 in 9e1107c
所以在正式开始配置前, 我补充了相关的
在实现配置之前, 想再向田博士 @fengttt 请教和确认一下
|
If you can, this should be a table level config. We accept the manual work if we need to configure it on several tables during test. This should not a session level config. Cannot depend on user to set this one correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test has no coverage on the config. Please add.
还有一点需要补充的是, 目前 |
504af7c
to
fe8da77
Compare
f0886a5
to
0e3ab6e
Compare
13ee4ec
to
7daa23b
Compare
- pass bvt -
- pass bvt in local
现在
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #15809
What this PR does / why we need it:
when composite primary key has a column that is auto-incr, and this column does not specify a value, no dup check is needed