-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Enhancement](MS) Add fix tablet data size api for meta service #41782
[Enhancement](MS) Add fix tablet data size api for meta service #41782
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
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.
clang-tidy made some suggestions
17f8700
to
bd799ef
Compare
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.
clang-tidy made some suggestions
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.
clang-tidy made some suggestions
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.
clang-tidy made some suggestions
@@ -2188,4 +2188,238 @@ std::pair<MetaServiceCode, std::string> MetaServiceImpl::get_instance_info( | |||
return {code, std::move(msg)}; | |||
} | |||
|
|||
MetaServiceResponseStatus MetaServiceImpl::fix_tablet_stats(std::string cloud_unique_id_str, |
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.
warning: function 'fix_tablet_stats' has cognitive complexity of 53 (threshold 50) [readability-function-cognitive-complexity]
MetaServiceResponseStatus MetaServiceImpl::fix_tablet_stats(std::string cloud_unique_id_str,
^
Additional context
cloud/src/meta-service/meta_service.cpp:2200: +1, including nesting penalty of 0, nesting level increased to 1
} catch (...) {
^
cloud/src/meta-service/meta_service.cpp:2207: +1, including nesting penalty of 0, nesting level increased to 1
if (instance_id.empty()) {
^
cloud/src/meta-service/meta_service.cpp:2218: +1, including nesting penalty of 0, nesting level increased to 1
if (err != TxnErrorCode::TXN_OK) {
^
cloud/src/meta-service/meta_service.cpp:2236: +1, including nesting penalty of 0, nesting level increased to 1
do {
^
cloud/src/meta-service/meta_service.cpp:2238: +2, including nesting penalty of 1, nesting level increased to 2
if (err != TxnErrorCode::TXN_OK) {
^
cloud/src/meta-service/meta_service.cpp:2244: +2, including nesting penalty of 1, nesting level increased to 2
while (it->has_next()) {
^
cloud/src/meta-service/meta_service.cpp:2251: +3, including nesting penalty of 2, nesting level increased to 3
if (out.size() == 7) {
^
cloud/src/meta-service/meta_service.cpp:2268: +4, including nesting penalty of 3, nesting level increased to 4
if (code != MetaServiceCode::OK) {
^
cloud/src/meta-service/meta_service.cpp:2291: +4, including nesting penalty of 3, nesting level increased to 4
if (!tablet_stat.SerializeToString(&tablet_stat_value)) {
^
cloud/src/meta-service/meta_service.cpp:2324: +4, including nesting penalty of 3, nesting level increased to 4
if (err != TxnErrorCode::TXN_OK) {
^
cloud/src/meta-service/meta_service.cpp:2338: +4, including nesting penalty of 3, nesting level increased to 4
if (tablet_stat_check.DebugString() != tablet_stat.DebugString()) {
^
cloud/src/meta-service/meta_service.cpp:2349: +4, including nesting penalty of 3, nesting level increased to 4
if (err != TxnErrorCode::TXN_OK) {
^
cloud/src/meta-service/meta_service.cpp:2358: +4, including nesting penalty of 3, nesting level increased to 4
if (tablet_stat_data_size_value.size() != sizeof(tablet_stat_data_size_check))
^
cloud/src/meta-service/meta_service.cpp:2368: +4, including nesting penalty of 3, nesting level increased to 4
if constexpr (std::endian::native == std::endian::big) {
^
cloud/src/meta-service/meta_service.cpp:2375: +4, including nesting penalty of 3, nesting level increased to 4
if (tablet_stat_data_size_check != tablet_stat_data_size) {
^
cloud/src/meta-service/meta_service.cpp:2385: +3, including nesting penalty of 2, nesting level increased to 3
if (sub_txn_id % 50 == 0) {
^
cloud/src/meta-service/meta_service.cpp:2387: +4, including nesting penalty of 3, nesting level increased to 4
if (err != TxnErrorCode::TXN_OK) {
^
cloud/src/meta-service/meta_service.cpp:2393: +1, nesting level increased to 4
} else {
^
cloud/src/meta-service/meta_service.cpp:2405: +1, including nesting penalty of 0, nesting level increased to 1
if (err != TxnErrorCode::TXN_OK) {
^
cloud/src/meta-service/meta_service.cpp:2413: +1, nesting level increased to 1
} else {
^
@@ -2188,4 +2188,238 @@ | |||
return {code, std::move(msg)}; | |||
} | |||
|
|||
MetaServiceResponseStatus MetaServiceImpl::fix_tablet_stats(std::string cloud_unique_id_str, |
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.
warning: function 'fix_tablet_stats' exceeds recommended size/complexity thresholds [readability-function-size]
MetaServiceResponseStatus MetaServiceImpl::fix_tablet_stats(std::string cloud_unique_id_str,
^
Additional context
cloud/src/meta-service/meta_service.cpp:2190: 231 lines including whitespace and comments (threshold 80)
MetaServiceResponseStatus MetaServiceImpl::fix_tablet_stats(std::string cloud_unique_id_str,
^
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.
clang-tidy made some suggestions
@@ -2188,4 +2188,342 @@ std::pair<MetaServiceCode, std::string> MetaServiceImpl::get_instance_info( | |||
return {code, std::move(msg)}; | |||
} | |||
|
|||
MetaServiceResponseStatus MetaServiceImpl::fix_tablet_stats(std::string cloud_unique_id_str, |
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.
warning: function 'fix_tablet_stats' exceeds recommended size/complexity thresholds [readability-function-size]
MetaServiceResponseStatus MetaServiceImpl::fix_tablet_stats(std::string cloud_unique_id_str,
^
Additional context
cloud/src/meta-service/meta_service.cpp:2190: 335 lines including whitespace and comments (threshold 80)
MetaServiceResponseStatus MetaServiceImpl::fix_tablet_stats(std::string cloud_unique_id_str,
^
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.
clang-tidy made some suggestions
@@ -18,10 +18,17 @@ | |||
#include "meta-service/meta_service_tablet_stats.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.
warning: 'meta-service/meta_service_tablet_stats.h' file not found [clang-diagnostic-error]
#include "meta-service/meta_service_tablet_stats.h"
^
@@ -19,6 +19,8 @@ | |||
|
|||
#include <gen_cpp/cloud.pb.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.
warning: 'gen_cpp/cloud.pb.h' file not found [clang-diagnostic-error]
#include <gen_cpp/cloud.pb.h>
^
63eb9a8
to
a745f7e
Compare
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.
clang-tidy made some suggestions
return st; | ||
} | ||
|
||
MetaServiceResponseStatus fix_tablet_stats_internal( |
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.
warning: function 'fix_tablet_stats_internal' exceeds recommended size/complexity thresholds [readability-function-size]
MetaServiceResponseStatus fix_tablet_stats_internal(
^
Additional context
cloud/src/meta-service/meta_service_tablet_stats.cpp:196: 104 lines including whitespace and comments (threshold 80)
MetaServiceResponseStatus fix_tablet_stats_internal(
^
2d305ac
to
fa2095a
Compare
run buildall |
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.
clang-tidy made some suggestions
return st; | ||
} | ||
|
||
MetaServiceResponseStatus fix_tablet_stats_internal( |
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.
warning: function 'fix_tablet_stats_internal' exceeds recommended size/complexity thresholds [readability-function-size]
MetaServiceResponseStatus fix_tablet_stats_internal(
^
Additional context
cloud/src/meta-service/meta_service_tablet_stats.cpp:196: 126 lines including whitespace and comments (threshold 80)
MetaServiceResponseStatus fix_tablet_stats_internal(
^
TeamCity be ut coverage result: |
run cloud_p0 |
run buildall |
TeamCity be ut coverage result: |
a0029ff
to
f125f11
Compare
run buildall |
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.
clang-tidy made some suggestions
return st; | ||
} | ||
|
||
MetaServiceResponseStatus fix_tablet_stats_internal( |
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.
warning: function 'fix_tablet_stats_internal' exceeds recommended size/complexity thresholds [readability-function-size]
MetaServiceResponseStatus fix_tablet_stats_internal(
^
Additional context
cloud/src/meta-service/meta_service_tablet_stats.cpp:196: 125 lines including whitespace and comments (threshold 80)
MetaServiceResponseStatus fix_tablet_stats_internal(
^
TeamCity be ut coverage result: |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
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
… size api for meta service (#41782)" (#43460) Pick #41782 --------- Co-authored-by: Yukang-Lian <[email protected]>
Proposed changes
Issue Number: close #xxx