-
Notifications
You must be signed in to change notification settings - Fork 409
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
Implememt pagestorage v3 #3909
Implememt pagestorage v3 #3909
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
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.
Mostly LGTM, wait before #3908 merge and rebase.
@JaySon-Huang done |
@@ -24,43 +26,46 @@ class PageStorageImpl : public DB::PageStorage | |||
|
|||
PageId getMaxId() override; | |||
|
|||
PageId getNormalPageId(PageId page_id, SnapshotPtr snapshot) override; | |||
PageId getNormalPageId(PageId page_id, SnapshotPtr snapshot = {}) override; |
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.
Using default value in a virtual/override function is not a good idea. It may cause problem if the default value is different.
However, I'll mark it in the TODO list and refactor it in the following PRs.
Example for causing confusing result:
> cat a.cpp
#include <iostream>
#include <memory>
struct A {
virtual void f(int x=999) {
std::cout << "A::f() called with x=" << x << "\n";
}
};
struct B : public A {
void f(int x=100) override {
std::cout << "B::f() called with x=" << x << "\n";
}
};
struct C: public A {};
int main()
{
std::unique_ptr<A> base_ptr_to_a = std::make_unique<A>();
base_ptr_to_a->f();
std::unique_ptr<A> base_ptr_to_b = std::make_unique<B>();
base_ptr_to_b->f();
std::unique_ptr<B> ptr_to_b = std::make_unique<B>();
ptr_to_b->f();
}
> g++ a.cpp -std=c++17 && ./a.out
A::f() called with x=999
B::f() called with x=999
B::f() called with x=100
/merge |
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger 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. |
This pull request has been accepted and is ready to merge. Commit hash: 3eed30c3d61eb4d9f6d6f75610c5ec55f54359f2
|
/merge |
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger 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. |
This pull request has been accepted and is ready to merge. Commit hash: 8ce9bbc3eeff4828c8391c7ee1d5d8b7e64687ab
|
/run-unit-test |
1 similar comment
/run-unit-test |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
We have to resolve the clang-tidy check before merging this PR |
/merge |
@jiaqizho: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger 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. |
This pull request has been accepted and is ready to merge. Commit hash: 94534e7b07996973b77a1067304fcb4b0b7776a2
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/hold |
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
/merge |
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger 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. |
This pull request has been accepted and is ready to merge. Commit hash: 5fd7c35
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/unhold |
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note