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

PageStorage control add more args to debug. #4994

Closed
wants to merge 5,283 commits into from
Closed

PageStorage control add more args to debug. #4994

wants to merge 5,283 commits into from

Conversation

jiaqizho
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #3594

Problem Summary:

What is changed and how it works?

  • Add only_restore_snapshot_log/not_restore_blob/skip_mvcc_gc
  • It can help dump wal/snapshot log without BlobStore init.

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

None

lidezhu and others added 30 commits March 15, 2022 12:49
* Remove previous pingcap license header

Signed-off-by: yibin <huyibin@pingcap.com>

* Process cluster_manage folder to add license folder

Signed-off-by: yibin <huyibin@pingcap.com>

* Remove empty lines

Signed-off-by: yibin <huyibin@pingcap.com>

* Process release-centos7-llvm for adding license header

Signed-off-by: yibin <huyibin@pingcap.com>

* Process release-darwin for adding license header

Signed-off-by: yibin <huyibin@pingcap.com>

* Process metrics for adding lh

Signed-off-by: yibin <huyibin@pingcap.com>

* Process tests for adding lh

Signed-off-by: yibin <huyibin@pingcap.com>

* Process deprected for adding lh

Signed-off-by: yibin <huyibin@pingcap.com>

* Process root CMakeLists.txt for adding lh

Signed-off-by: yibin <huyibin@pingcap.com>

* Process cmake for adding lh

Signed-off-by: yibin <huyibin@pingcap.com>

* Process root files for adding lh

Signed-off-by: yibin <huyibin@pingcap.com>

* Process dbms for adding lh

Signed-off-by: yibin <huyibin@pingcap.com>

* Process libs for adding lh

Signed-off-by: yibin <huyibin@pingcap.com>

* Makeup for several files added very recently that missing license head

Signed-off-by: yibin <huyibin@pingcap.com>

* Process one more recently commit file

Signed-off-by: yibin <huyibin@pingcap.com>

Co-authored-by: ruoxi <zanmato1984@gmail.com>
* 1.add metrics of calldata&mpptunnel 2.refine shutdown logic

Signed-off-by: bestwoody <bestwoody@163.com>

* update

* Apply suggestions from code review

Co-authored-by: Fu Zhe <fuzhe1989@gmail.com>

* Update dbms/src/Flash/EstablishCall.cpp

Co-authored-by: Fu Zhe <fuzhe1989@gmail.com>

* add harm limit to wait

Signed-off-by: bestwoody <bestwoody@163.com>

* fix

Signed-off-by: bestwoody <bestwoody@163.com>

Co-authored-by: Fu Zhe <fuzhe1989@gmail.com>
jiaqizho and others added 14 commits May 20, 2022 16:42
* flush cache before segment merge

* keep flush until success

* check whether segment is valid if flush failed

* Update dbms/src/Storages/DeltaMerge/tests/gtest_dm_segment.cpp

Co-authored-by: JaySon <tshent@qq.com>

* add more fix

* check flush result in segment::write

Co-authored-by: JaySon <tshent@qq.com>
…uled task with exceeded state from the waiting tasks queue (#4958)

close #4954
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 release-note-none Denotes a PR that doesn't merit a release note. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 25, 2022
@jiaqizho jiaqizho requested a review from hehechen May 25, 2022 06:47
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 25, 2022
Comment on lines 66 to 75
#ifndef NDEBUG
if (only_snapshot_log)
{
if (name.level_num >= 1)
{
log_files.insert(name);
}
break;
}
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need this. We can tell where the entry from by checking this log

LOG_FMT_DEBUG(logger, "Open log file for reading [file={}]", fullname);

@@ -470,8 +526,14 @@ class PageStorageControl

using namespace DB::PS::V3;
int main(int argc, char ** argv)
try
{
const auto & options = ControlOptions::parse(argc, argv);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest use TiFlashTestEnv::setupLogger to setup logger and replace all cerr/cout by LOG_FMT_XXX

void TiFlashTestEnv::setupLogger(const String & level, std::ostream & os)
{
Poco::AutoPtr<Poco::ConsoleChannel> channel = new Poco::ConsoleChannel(os);
Poco::AutoPtr<UnifiedLogPatternFormatter> formatter(new UnifiedLogPatternFormatter());
formatter->setProperty("pattern", "%L%Y-%m-%d %H:%M:%S.%i [%I] <%p> %s: %t");
Poco::AutoPtr<Poco::FormattingChannel> formatting_channel(new Poco::FormattingChannel(formatter, channel));
Poco::Logger::root().setChannel(formatting_channel);
Poco::Logger::root().setLevel(level);
}

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 26, 2022
@ti-chi-bot
Copy link
Member

@jiaqizho: PR needs rebase.

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 added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 26, 2022
@jiaqizho jiaqizho closed this May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.