-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: compute ADMIN CHECKSUM for partitioned tables correctly #11089
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11089 +/- ##
===============================================
- Coverage 81.222% 81.0032% -0.2188%
===============================================
Files 420 419 -1
Lines 90031 89347 -684
===============================================
- Hits 73125 72374 -751
- Misses 11675 11729 +54
- Partials 5231 5244 +13 |
Codecov Report
@@ Coverage Diff @@
## master #11089 +/- ##
===========================================
Coverage 81.7694% 81.7694%
===========================================
Files 423 423
Lines 91928 91928
===========================================
Hits 75169 75169
Misses 11458 11458
Partials 5301 5301 |
PTAL @lamxTyler (I'm not sure what happened with the coverage 😕) |
} | ||
|
||
reqs := make([]*kv.Request, 0, (len(c.TableInfo.Indices)+1)*(len(partDefs)+1)) | ||
if err := c.appendRequest(ctx, c.TableInfo.ID, &reqs); err != nil { |
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.
Can we save the request to the table when it is a partitioned table since it won't have any data?
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.
Yes we could (add an if
clause), but since the range contains no data I think the overhead would be small. OTOH if we do want to support global index, I suppose those indices will be placed in the table itself, so we still need to appendRequest(c.TableInfo.ID)
.
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.
LGTM
PTAL @winkyao |
😐 PTAL @zz-jason |
/run-all-tests |
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.
LGTM
What problem does this PR solve?
Fix #10796. The ADMIN CHECKSUM TABLE of a partition table was not computed correctly since the actual data and indices are stored in the child physical tables (the partitions).
What is changed and how it works?
If a table has partitions, push the checksum requests for those tables too.
Check List
Tests
Code changes
Side effects
Related changes