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

[feature](debug) support debug point used in debug code #24502

Merged
merged 10 commits into from
Sep 25, 2023

Conversation

yujun777
Copy link
Collaborator

Proposed changes

Debug point is a code switch used for debug development.When a debug point is opened, the corresponding code can be executed.

Both fe and be support debug points.

For example, we want to debug publish version with TOO_MANY_VERSIONS error. Then we can add debug code in BE:

Status   StorageEngine::do_publish_version() {
            .....

           //"test_too_many_versions" is a debug point,
           // if it's enabled,  then it will return error TOO_MANY_VERSIONS
          DBUG_EXECUTE_IF("test_too_many_versions",   {  return Err(TOO_MANY_VERSIONS); });  

          ......
}

for fe, no macro DBUG_EXECUTE_IF, but just use function DebugPointUtil.isEnable(debug_point) to test if enable a debug point;

To enable a debug point, we need two steps:

  1. start fe or be with config.enable_debug_points = true;
  2. post a http request /api/debug_point/add/{debug_point_name} to the fe or be;

Http API:

  1. add a debug point: post /api/debug_point/add/{debug_point_name}[?execute=times&timeout=seconds]. execute is optional, indicates the maximum number of times the debug point can take effect. timeout is optional, indicates the maximum number of seconds the debug point takes effect;
  2. remove a debug point: post /api/debug_point/remove/{debug_point_name};
  3. clear all the debug points: post /api/debug_point/clear.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@yujun777
Copy link
Collaborator Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.83% (7981/21667)
Line Coverage: 28.85% (64032/221911)
Region Coverage: 27.74% (33225/119770)
Branch Coverage: 24.37% (17035/69904)
Coverage Report: http://coverage.selectdb-in.cc/coverage/d17abc68282c852deec5f23926d3d42c4d432382_d17abc68282c852deec5f23926d3d42c4d432382/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 49.65 seconds
stream load tsv: 598 seconds loaded 74807831229 Bytes, about 119 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.7 seconds inserted 10000000 Rows, about 348K ops/s
storage size: 17162152973 Bytes

@yujun777
Copy link
Collaborator Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 51.2 seconds
stream load tsv: 599 seconds loaded 74807831229 Bytes, about 119 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17162479058 Bytes

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.83% (7979/21667)
Line Coverage: 28.85% (64022/221911)
Region Coverage: 27.74% (33224/119770)
Branch Coverage: 24.37% (17033/69904)
Coverage Report: http://coverage.selectdb-in.cc/coverage/4523ce3001cad221c2f04c839a78a939e08847b9_4523ce3001cad221c2f04c839a78a939e08847b9/report/index.html

@yujun777
Copy link
Collaborator Author

run buildall

1 similar comment
@yujun777
Copy link
Collaborator Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@yujun777
Copy link
Collaborator Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.41% (8023/22037)
Line Coverage: 28.70% (64430/224523)
Region Coverage: 27.61% (33467/121213)
Branch Coverage: 24.27% (17121/70540)
Coverage Report: http://coverage.selectdb-in.cc/coverage/1895700a028108e1dda2a19fabbb8080c43ac6f6_1895700a028108e1dda2a19fabbb8080c43ac6f6/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.95 seconds
stream load tsv: 598 seconds loaded 74807831229 Bytes, about 119 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162421789 Bytes

@yujun777
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a 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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.40% (8021/22037)
Line Coverage: 28.69% (64416/224523)
Region Coverage: 27.59% (33448/121213)
Branch Coverage: 24.27% (17119/70540)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b69d412649f56d92bfb8c2cb569a15da93228895_b69d412649f56d92bfb8c2cb569a15da93228895/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.79 seconds
stream load tsv: 594 seconds loaded 74807831229 Bytes, about 120 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162380971 Bytes

@yujun777
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.41% (8023/22038)
Line Coverage: 28.69% (64430/224555)
Region Coverage: 27.60% (33457/121231)
Branch Coverage: 24.27% (17123/70552)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b69d412649f56d92bfb8c2cb569a15da93228895_b69d412649f56d92bfb8c2cb569a15da93228895/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.59 seconds
stream load tsv: 599 seconds loaded 74807831229 Bytes, about 119 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17162378503 Bytes

Copy link
Contributor

@github-actions github-actions bot left a 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

Copy link
Contributor

@github-actions github-actions bot left a 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

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.7 seconds
stream load tsv: 577 seconds loaded 74807831229 Bytes, about 123 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.6 seconds inserted 10000000 Rows, about 349K ops/s
storage size: 17162475422 Bytes

@yujun777
Copy link
Collaborator Author

run buildall

@yujun777
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a 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

@yujun777
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a 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

Copy link
Contributor

@github-actions github-actions bot left a 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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.37% (8112/22307)
Line Coverage: 28.48% (64846/227693)
Region Coverage: 27.38% (33638/122853)
Branch Coverage: 24.03% (17170/71466)
Coverage Report: http://coverage.selectdb-in.cc/coverage/3307c73b30f70b64a2cac1241368cd058accb792_3307c73b30f70b64a2cac1241368cd058accb792/report/index.html

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.36% (8110/22307)
Line Coverage: 28.49% (64872/227693)
Region Coverage: 27.38% (33642/122853)
Branch Coverage: 24.02% (17168/71466)
Coverage Report: http://coverage.selectdb-in.cc/coverage/3307c73b30f70b64a2cac1241368cd058accb792_3307c73b30f70b64a2cac1241368cd058accb792/report/index.html

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.36% (8110/22307)
Line Coverage: 28.49% (64875/227693)
Region Coverage: 27.38% (33637/122853)
Branch Coverage: 24.03% (17174/71466)
Coverage Report: http://coverage.selectdb-in.cc/coverage/db69935fbfdf9ec67ae7c988a272cfb0b283e9c2_db69935fbfdf9ec67ae7c988a272cfb0b283e9c2/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.74 seconds
stream load tsv: 585 seconds loaded 74807831229 Bytes, about 121 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.6 seconds inserted 10000000 Rows, about 349K ops/s
storage size: 17162397032 Bytes

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.2 seconds
stream load tsv: 576 seconds loaded 74807831229 Bytes, about 123 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17162412920 Bytes

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 25, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.3-merged merge_conflict reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants