-
Notifications
You must be signed in to change notification settings - Fork 538
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
base: master
Are you sure you want to change the base?
Conversation
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, I suppose there will be followups
eb79ab1
to
9679054
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.
LGTM
@@ -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 |
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.
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
-
In the corresponding SMP cases, FunAction::dump() writes a "by kidN {" prefix. ↩
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.
Those bad designs need to be replaced and are part of why this TODO has a condition ("when ...") stated.
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.
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.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@yadij how would you like to proceed here? |
This PR using |
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.
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 |
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.
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.
No description provided.