-
Notifications
You must be signed in to change notification settings - Fork 411
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
Storage: (Refactor) Avoid referencing DeltaMergeStore.h #5835
Conversation
Signed-off-by: Wish <[email protected]>
Signed-off-by: Wish <[email protected]>
Signed-off-by: Wish <[email protected]>
Signed-off-by: Wish <[email protected]>
Signed-off-by: Wish <[email protected]>
[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. |
Signed-off-by: Wish <[email protected]>
@@ -14,29 +14,24 @@ | |||
|
|||
#pragma once | |||
|
|||
#include <Common/Logger.h> |
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 remove this header file?
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.
It should be a better practice to include everything you used in this header file as possible, even if it may be included transitively by other included header files. In this way, this header is less likely to break when other headers are refactored.
In this case, as StorageDeltaMerge
has a field of type LoggerPtr
, we could explicitly introduce it.
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.
We can use forward declaration here, using
namespace DB
{
class Logger;
using LoggerPtr = std::shared_ptr<Logger>;
}
instead of including the <Common/Logger.h>
.
Here I think both are OK since Common/Logger.h
itself is a clean header file that doesn't bring many other header files.
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
F(type_delta_merge_bg_gc, {"type", "delta_merge_bg_gc"}), \ | ||
F(type_delta_merge_fg, {"type", "delta_merge_fg"}), \ | ||
F(type_delta_merge_manual, {"type", "delta_merge_manual"}), \ |
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.
Does grafana need to adjust?
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.
In Grafana expressions are using "delta_merge|seg" as matchers, so there is no need to adjust.
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 with a minor comment
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
/merge |
@breezewish: 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: d85449e
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: ref #5831
DeltaMerge/DeltaMergeStore.h
is imported inStorages/StorageDeltaMerge.h
, which makes the pimpl useless -- When changing private member functions inDeltaMerge/DeltaMergeStore.h
, a lot of external functions need to be recompiled.What is changed and how it works?
TaskRunThread
toMergeDeltaReason
, which makes more sense.TaskRunThread
orMergeDeltaReason
in DeltaMerge public APImergeDeltaBySegment
, as run thread or merge reason are purely internal.RowKeyValue
so that the import of internal DeltaMerge headers can be avoided.Check List
Tests
Side effects
Documentation
Release note