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

import into: log checksum for each KV group #50871

Merged
merged 17 commits into from
Feb 18, 2024

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Feb 1, 2024

What problem does this PR solve?

Issue Number: ref #50832

Problem Summary:

What changed and how does it work?

  • prints log for the checksum of each KV group
  • move the calculation of checksum from delivering goroutine to encoding goroutine, to avoid checksum is lost after encoding before delivering
  • unify the two encoders for file source and query source by using a readFn

Check List

Tests

  • Unit test
  • Integration test
  • Manual test: pass 40T test
  • No need to test

    pass existing tests

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 1, 2024
@lance6716 lance6716 marked this pull request as draft February 1, 2024 04:15
Copy link

tiprow bot commented Feb 1, 2024

Hi @lance6716. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: lance6716 <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 1, 2024
@lance6716 lance6716 marked this pull request as ready for review February 1, 2024 06:32
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Merging #50871 (1510ec1) into master (464a126) will decrease coverage by 0.0688%.
The diff coverage is 89.7755%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #50871        +/-   ##
================================================
- Coverage   72.3101%   72.2414%   -0.0688%     
================================================
  Files          1467       1468         +1     
  Lines        361663     437922     +76259     
================================================
+ Hits         261519     316361     +54842     
- Misses        80851     101491     +20640     
- Partials      19293      20070       +777     
Flag Coverage Δ
integration 27.9971% <87.7805%> (?)
unit 70.2789% <75.5611%> (-1.8902%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 54.3668% <ø> (-1.9461%) ⬇️
parser ∅ <ø> (∅)
br 51.3057% <91.9191%> (+4.9857%) ⬆️

Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
@lance6716 lance6716 changed the title [WIP]Separate index group import into: log checksum for each KV group Feb 1, 2024
@ti-chi-bot ti-chi-bot bot removed do-not-merge/invalid-title do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 1, 2024
@lance6716
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 1, 2024

@lance6716: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lance6716
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 1, 2024

@lance6716: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Comment on lines 362 to 365
task.Info("data group checksum", zap.Object("checksum", p.enc.dataChecksum))
for indexID, c := range p.enc.indexChecksum {
p.chunkInfo.Checksum.Add(c)
task.Info("index group checksum", zap.Int64("indexID", indexID), zap.Object("checksum", c))
Copy link
Contributor

@D3Hunter D3Hunter Feb 2, 2024

Choose a reason for hiding this comment

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

it's too many to have each set of logs for each chunk, can we have each set for each subtask, and only print it at post-process step, else we have to sum them up manually

Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Copy link
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

will review later

br/pkg/lightning/verification/checksum.go Outdated Show resolved Hide resolved
Copy link
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

rest lgtm

br/pkg/lightning/verification/checksum.go Outdated Show resolved Hide resolved
br/pkg/lightning/verification/checksum.go Outdated Show resolved Hide resolved
br/pkg/lightning/verification/checksum.go Outdated Show resolved Hide resolved
br/pkg/lightning/verification/checksum.go Outdated Show resolved Hide resolved
pkg/disttask/importinto/proto.go Outdated Show resolved Hide resolved
br/pkg/lightning/verification/checksum.go Show resolved Hide resolved
pkg/disttask/importinto/subtask_executor.go Outdated Show resolved Hide resolved
pkg/disttask/importinto/task_executor.go Outdated Show resolved Hide resolved
pkg/executor/importer/chunk_process.go Outdated Show resolved Hide resolved
Signed-off-by: lance6716 <[email protected]>
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 5, 2024
@lance6716
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 18, 2024

@lance6716: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Feb 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, D3Hunter

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 18, 2024
Copy link

ti-chi-bot bot commented Feb 18, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-05 07:34:59.709180524 +0000 UTC m=+169425.275950399: ☑️ agreed by D3Hunter.
  • 2024-02-18 07:41:46.456144539 +0000 UTC m=+170195.203767650: ☑️ agreed by Benjamin2037.

Copy link

tiprow bot commented Feb 18, 2024

@lance6716: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tiprow_fast_test 0fee9cf link true /test tiprow_fast_test

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@lance6716
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 18, 2024

@lance6716: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot merged commit 65d57c0 into pingcap:master Feb 18, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants