-
Notifications
You must be signed in to change notification settings - Fork 603
Maintenance: update mcast_groups to SBufList #2312
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
base: master
Are you sure you want to change the base?
Conversation
kinkie
left a comment
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.
nice!
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.
I plan to come back to this new PR after the backlog is cleared. FWIW, my earlier repeated requests to stop posting such PRs still stand.
P.S. I removed "Maintenance" prefix from PR title because this PR does change running code in non-trivial ways.
| size_t tcpRcvBufsz; | ||
| size_t udpMaxHitObjsz; | ||
| wordlist *mcast_group_list; | ||
| SBufList mcast_group_list; |
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.
Please do not add non-POD data members to SquidConfig. That class must be a POD because the global configuration object is accessed before main() starts and after main() exits1. Our NoNewGlobals policy essentially applies to SquidConfig data members. SquidConfig is already documented to be a POD. Several existing data members violate this rule and that documentation2, but we should not make the problem more difficult to fix by adding new violations.
AFAICT, the correct new type for mcast_group_list data member is a raw pointer to SBufList. Unfortunately, more code changes are required to support that new type in current code, but nothing major.
Footnotes
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.
FYI: SquidConfig has contained other SBufList for a year now without problems. So has already been proven safe for this particular global usage.
FTR: the issues requiring strictly POD-only members have been resolved since Squid v4 (3b1439d). Objects which use MEMPROXY allocation and are default constructable can be used, at least as members of existing globals now.
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.
The issue(s) behind c565067 were that values within the post initialization SSL_CTX are not global safe. The ContextPointer itself should be global-safe, but the context it was pointing to needed to be deleted explicitly at a certain timing/order.
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.
FTR: the issues requiring strictly POD-only members have been resolved since Squid v4 (3b1439d).
The "issues" are C++ global object construction and destruction rules. They cannot be resolved without changing the language itself.
"trivial" is not required for something to be maintenance. FYI, this PR is enacting software maintenance process step 5 migration - deprecated/obsolete That step is also commonly called/described as "preventative maintenance: Refactoring the codebase to improve efficiency, readability, and maintainability, and make it less prone to errors." |
|
I agree with keeping the PR title as is |
rousskov
left a comment
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: I removed "Maintenance" prefix from PR title because this PR does change running code in non-trivial ways.
Amos: "trivial" is not required for something to be maintenance.
Very true, but I am against using "Maintenance" PR title prefix for such non-trivial changes. IIRC, I have already detailed the reasons behind my preference, probably more than once.
Francesco: I agree with keeping the PR title as is
Sigh. Counting votes is not how we should resolve differences in opinion, IMHO.
| size_t tcpRcvBufsz; | ||
| size_t udpMaxHitObjsz; | ||
| wordlist *mcast_group_list; | ||
| SBufList mcast_group_list; |
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.
FTR: the issues requiring strictly POD-only members have been resolved since Squid v4 (3b1439d).
The "issues" are C++ global object construction and destruction rules. They cannot be resolved without changing the language itself.
It can be if other options fail, but that was not the message I was aiming for. I don't think such a trivial change is something that is worth holding up a PR on. |
Understood. Thank you for confirming that my attempts to explain why (or even relay that) title prefixes are not a trivial matter for me have failed. |
Trivial != unimportant. I don't think they're trivial but if I am to list components of a PR in descending order of importance for me, I have:
Nothing is trivial, but for me, I'd generally request changes for 1-3, suggest changes for 4-5 and maybe drop a comment for 7 (6 is important but can't be changed, obviously) |
I understand that prefixes are the least important item for you. I wish the fact that prefixes are important for me would change your authors-choice treatment, but I obviously lost that battle. |
You may have failed to convince me that it's worthwhile holding up a PR on prefixes, but at the same time I'm not forcing your (or anyone else's) behaviour. It's fine to have different viewpoints |
I was hoping for your assistance with reducing my overheads1, but "not forcing your behaviour" is certainly better than some of the alternatives I can easily imagine. Thank you for that!
Just to avoid a misunderstanding: My negative votes for this PR were not due to this PR title prefix. Footnotes
|
No description provided.