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

Fix randomly build failed because mpp.pb.h not found #4331

Merged
merged 5 commits into from
Mar 17, 2022

Conversation

guo-shaoge
Copy link
Contributor

@guo-shaoge guo-shaoge commented Mar 17, 2022

Signed-off-by: guo-shaoge [email protected]

What problem does this PR solve?

Issue Number: close #4318

Problem Summary: As issue said, got compilation error. Introduced by #4183. clickhouse_common_io need mpp.pb.h, but doesn't add kvproto as its dependency.

How to reproduce this problem:

  1. git clone tiflash repo && git submodule update --init --recursive
  2. mkdir build && cd build
  3. cmake .. -DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DENABLE_TESTING=OFF -DENABLE_TESTS=OFF -Wno-dev -DUSE_CCACHE=OFF -DRUN_HAVE_STD_REGEX=0 -GNinja . Make sure use ninja, I cannot reproduce with make
  4. ninja tiflash -j40. Make sure use high job concurrency.

What is changed and how it works?

  1. MyTime.cpp(clickhouse_common_io) includes FunctionsDatetime.h
  2. FunctionsDatetime.h includes DAGContext.h.(Added by support last_day and dayofmonth pushdown to tiflash #4183)
  3. DAGContext.h includes mpp.pb.h

Remove the dependency of MyTime.cpp on FunctionsDatetime.h, which is more reasonable. So clickhouse_common_io will not depend on kvproto.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

Fix randomly build failed because mpp.pb.h not found

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 17, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • fuzhe1989
  • windtalker

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-triage-completed release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 17, 2022
@guo-shaoge
Copy link
Contributor Author

/run-check-issue-triage-complete

@@ -15,7 +15,7 @@
#include <Common/MyTime.h>
#include <Common/StringUtils/StringRefUtils.h>
#include <Common/StringUtils/StringUtils.h>
#include <Functions/FunctionsDateTime.h>
#include <IO/WriteHelpers.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For DB::toString()

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 17, 2022
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 17, 2022
Copy link
Contributor

@zanmato1984 zanmato1984 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added needs-cherry-pick-release-6.0 Type: Need cherry pick to release-6.0 and removed do-not-merge/needs-triage-completed labels Mar 17, 2022
@guo-shaoge
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@guo-shaoge: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: a3bc0c5

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 17, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Mar 17, 2022

Coverage for changed files

Filename                          Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Common/MyTime.cpp                    1048               206    80.34%         112                25    77.68%        2153               518    75.94%         920               256    72.17%
Common/MyTime.h                        22                 0   100.00%           9                 0   100.00%          30                 0   100.00%          16                 3    81.25%
Functions/FunctionsDateTime.h        1031               628    39.09%         322               211    34.47%        1942              1196    38.41%         498               324    34.94%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                2101               834    60.30%         443               236    46.73%        4125              1714    58.45%        1434               583    59.34%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16975      9546             43.76%    191250  96878        49.34%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit 0d51eec into pingcap:master Mar 17, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: cannot checkout release-6.0: error checking out release-6.0: exit status 1. output: error: pathspec 'release-6.0' did not match any file(s) known to git

@JaySon-Huang JaySon-Huang deleted the fix_ci_mpp_pb_h branch March 17, 2022 13:31
@guo-shaoge
Copy link
Contributor Author

In response to a cherrypick label: cannot checkout release-6.0: error checking out release-6.0: exit status 1. output: error: pathspec 'release-6.0' did not match any file(s) known to git

Already in release-6.0, no need to cherry pick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.0 Type: Need cherry pick to release-6.0 release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build MyTime.cpp.o failed because of mpp.pb.h not found randomly
6 participants