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

IGNITE-24550 Port throttling metrics from AI2 #5392

Merged
merged 5 commits into from
Mar 12, 2025

Conversation

ibessonov
Copy link
Contributor

https://issues.apache.org/jira/browse/IGNITE-24550

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

/**
* Metric source for persistent page memory.
*/
public class PersistentPageMemoryMetricSource implements MetricSource {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would ask you to indicate in the documentation for the fields that they are guarded by the monitor, otherwise I immediately notice bugs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

otherwise I immediately notice bugs.

What do you mean? What bugs?

Copy link
Contributor

Choose a reason for hiding this comment

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

As soon as I saw these fields, I thought there would be data races, until I looked at each method.
Do you think it might be worth using method synchronization instead of synchronization by internal mutex?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly, I just did what all other implementations did :)
But I don't mind synchronizing on this here, but if someone would insist, I'd fix it. I know that it is not a recommended practice

Signed-off-by: ibessonov <[email protected]>
@ibessonov ibessonov merged commit ae7b6c0 into apache:main Mar 12, 2025
1 check passed
@ibessonov ibessonov deleted the ignite-24550 branch March 12, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants