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

Refactor the basic manager Action classes for Action::report() #1560

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

yadij
Copy link
Contributor

@yadij yadij commented Oct 31, 2023

No description provided.

@rousskov rousskov self-requested a review October 31, 2023 14:28
kinkie
kinkie previously approved these changes Oct 31, 2023
Copy link
Contributor

@kinkie kinkie left a comment

Choose a reason for hiding this comment

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

LGTM, I suppose there will be followups

src/mgr/Action.cc Outdated Show resolved Hide resolved
src/mgr/Action.h Outdated Show resolved Hide resolved
src/mgr/Action.h Show resolved Hide resolved
src/mgr/Action.h Outdated Show resolved Hide resolved
src/mgr/Action.h Outdated Show resolved Hide resolved
src/mgr/Action.h Outdated Show resolved Hide resolved
src/mgr/BasicActions.cc Outdated Show resolved Hide resolved
src/mgr/BasicActions.cc Show resolved Hide resolved
src/mgr/BasicActions.cc Outdated Show resolved Hide resolved
src/mgr/BasicActions.cc Outdated Show resolved Hide resolved
@rousskov rousskov added the S-waiting-for-author author action is expected (and usually required) label Nov 2, 2023
@yadij yadij force-pushed the arc-mgr-ostream-1 branch from eb79ab1 to 9679054 Compare November 8, 2023 06:31
@yadij yadij added S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box and removed S-waiting-for-author author action is expected (and usually required) labels Nov 9, 2023
@yadij yadij requested a review from rousskov November 9, 2023 10:28
@rousskov rousskov removed their request for review November 9, 2023 14:08
@rousskov rousskov added S-waiting-for-author author action is expected (and usually required) and removed S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box labels Nov 9, 2023
@yadij yadij added S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box and removed S-waiting-for-author author action is expected (and usually required) labels Nov 10, 2023
@yadij yadij requested review from rousskov and kinkie November 10, 2023 13:44
kinkie
kinkie previously approved these changes Nov 26, 2023
Copy link
Contributor

@kinkie kinkie left a comment

Choose a reason for hiding this comment

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

LGTM

src/mgr/Action.h Outdated Show resolved Hide resolved
@@ -112,11 +113,18 @@ Mgr::Action::fillEntry(StoreEntry* entry, bool writeHttpHeader)
entry->replaceHttpReply(rep);
}

dump(entry);
dump(entry); // TODO: replace with report() when all children are converted
Copy link
Contributor

Choose a reason for hiding this comment

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

With the PR-proposed "just write the report" semantics, it is not possible to convert some of the existing Mgr::Action children (and some future ones). For example, Mgr::FunAction objects that handle asynchronous mgr:objects and mgr:vm_objects reports cannot be converted because their existing dump() methods do more than "just writing the report" and, in non-SMP cases1, do not "write the report" at all. The guts of their dump() actions are essentially one no-output line:

    eventAdd("statObjects", statObjects, state, 0.0, 1);

The fundamental property of asynchronous cache manager actions cannot be removed by conversion or refactoring that might be relevant to this TODO. This TODO goes against core Action architecture/features that require that asynchronous production of some cache manager reports, including dump() calls that may not produce output (because an asynchronous action is required to start producing it) or do not finish producing output (again, because an asynchronous action is required to continue and finish producing output).

N.B. There is more about this problem in the other change request. I am not sure which change request has a better context for this discussion. The other change request has a specific suggestion for addressing both problems.

Footnotes

  1. In the corresponding SMP cases, FunAction::dump() writes a "by kidN {" prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those bad designs need to be replaced and are part of why this TODO has a condition ("when ...") stated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Alex: With the PR-proposed "just write the report" semantics, it is not possible to convert some of the existing Mgr::Action children (and some future ones). ... The fundamental property of asynchronous cache manager actions cannot be removed by conversion or refactoring that might be relevant to this TODO. This TODO goes against core Action architecture/features that ...

Amos: Those bad designs need to be replaced and are part of why this TODO has a condition ("when ...") stated.

This change request has already evaluated and rejected that condition, providing detailed reasoning and examples. No new information or arguments have been provided in response to that change request. There is currently no consensus that any future hypothetical refactoring (unspecified in this PR) can justify this TODO existence.

@rousskov rousskov added S-waiting-for-author author action is expected (and usually required) and removed S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box labels Dec 11, 2023
@yadij

This comment was marked as resolved.

@rousskov rousskov added the S-waiting-for-PR Closure of other PR(s), current or future, is expected (and usually required) label Dec 14, 2023
@rousskov

This comment was marked as resolved.

@rousskov rousskov removed the S-waiting-for-PR Closure of other PR(s), current or future, is expected (and usually required) label Dec 14, 2023
@kinkie
Copy link
Contributor

kinkie commented Dec 16, 2023

@yadij how would you like to proceed here?

@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Jan 9, 2024
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Feb 14, 2024
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Mar 5, 2024
@kinkie kinkie added the M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels label Mar 15, 2024
@yadij yadij changed the title Add Cache Manager stream output API Refactor the basic cache manager Action classes for Action::report() May 7, 2024
@yadij yadij changed the title Refactor the basic cache manager Action classes for Action::report() Refactor the basic manager Action classes for Action::report() May 7, 2024
@yadij yadij added S-waiting-for-PR Closure of other PR(s), current or future, is expected (and usually required) and removed S-waiting-for-author author action is expected (and usually required) M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels labels May 7, 2024
@yadij yadij requested a review from rousskov May 7, 2024 12:44
@yadij yadij added the S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box label May 7, 2024
@yadij
Copy link
Contributor Author

yadij commented May 7, 2024

This PR using Action::report() is now waiting on PR #1806 merge.

Copy link
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

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

This PR using Action::report() is now waiting on PR #1806 merge.

Understood. Please request my review when that controversial prerequisite PR is closed and this PR is adjusted accordingly.

@@ -112,11 +113,18 @@ Mgr::Action::fillEntry(StoreEntry* entry, bool writeHttpHeader)
entry->replaceHttpReply(rep);
}

dump(entry);
dump(entry); // TODO: replace with report() when all children are converted
Copy link
Contributor

Choose a reason for hiding this comment

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

Alex: With the PR-proposed "just write the report" semantics, it is not possible to convert some of the existing Mgr::Action children (and some future ones). ... The fundamental property of asynchronous cache manager actions cannot be removed by conversion or refactoring that might be relevant to this TODO. This TODO goes against core Action architecture/features that ...

Amos: Those bad designs need to be replaced and are part of why this TODO has a condition ("when ...") stated.

This change request has already evaluated and rejected that condition, providing detailed reasoning and examples. No new information or arguments have been provided in response to that change request. There is currently no consensus that any future hypothetical refactoring (unspecified in this PR) can justify this TODO existence.

@rousskov rousskov removed the S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box label May 7, 2024
@kinkie kinkie added the M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels S-waiting-for-PR Closure of other PR(s), current or future, is expected (and usually required)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants