-
Notifications
You must be signed in to change notification settings - Fork 849
fix hosting.config reload #8664
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,7 +152,7 @@ class CacheHostTable | |
| struct CacheHostTableConfig; | ||
| typedef int (CacheHostTableConfig::*CacheHostTabHandler)(int, void *); | ||
| struct CacheHostTableConfig : public Continuation { | ||
| CacheHostTable **ppt; | ||
| std::atomic<CacheHostTable **> ppt; | ||
| CacheHostTableConfig(CacheHostTable **appt) : Continuation(nullptr), ppt(appt) | ||
| { | ||
| SET_HANDLER((CacheHostTabHandler)&CacheHostTableConfig::mainEvent); | ||
|
|
@@ -163,8 +163,9 @@ struct CacheHostTableConfig : public Continuation { | |
| { | ||
| (void)e; | ||
| (void)event; | ||
| CacheHostTable *t = new CacheHostTable((*ppt)->cache, (*ppt)->type); | ||
| CacheHostTable *old = (CacheHostTable *)ink_atomic_swap(&t, *ppt); | ||
| CacheHostTable *t = new CacheHostTable((*ppt)->cache, (*ppt)->type); | ||
| auto old = *ppt; | ||
| (*ppt) = t; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this needs to be a With the outer pointer-pointer being atomic, but not the inner, I believe in |
||
| new_Deleter(old, CACHE_MEM_FREE_TIMEOUT); | ||
| return EVENT_DONE; | ||
| } | ||
|
|
||
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 noticed this isn't used by anything external. It'd be nice to make it
private, to enforce that, and make it easier for readers to know that