Skip to content

Conversation

@weizuo93
Copy link
Contributor

Proposed changes

  1. Add metrics to used permits and waitting permits for compaction. It would be useful to monitor permits hold by all executing compaction tasks and waitting compaction task.

  2. Add log which can be chosen by config for merge rowsets. It would be helpful to track the process of rowsets merging for compaction task which lasts for a long time.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • [] Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • [] Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [] I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • If this change need a document change, I have updated the document
  • Any dependent changes have been merged

RETURN_NOT_OK_LOG(dst_rowset_writer->add_row(row_cursor),
"failed to write row when merging rowsets of tablet " + tablet->full_name());
output_rows++;
if (config::row_step_for_compaction_merge_log != 0 && output_rows % config::row_step_for_compaction_merge_log == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is "LOG_EVERY_N" macro for this purpose

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is "LOG_EVERY_N" macro for this purpose

OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is "LOG_EVERY_N" macro for this purpose

"LOG_EVERY_N" will print a message after "LOG_EVERY_N" is executed n times. After test,"LOG_EVERY_N" macro is for all compaction threads,it means a message will be printed after n rows merged for all compaction tasks. But we need a message after n rows merged for a particular compaction task.

@weizuo93 weizuo93 force-pushed the add-used-permits-metrics branch from 2056b27 to 791a9cd Compare November 24, 2020 08:10
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added area/compact Issues or PRs related to the compact kind/improvement labels Nov 24, 2020
@morningman morningman merged commit 4c63dc0 into apache:master Nov 28, 2020
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
@weizuo93 weizuo93 deleted the add-used-permits-metrics branch March 9, 2022 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/compact Issues or PRs related to the compact kind/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants