fix hosting.config reload
When hosting.config reloads, currently the file is properly loaded and placed in a new hosting table. However when ats goes to place it in use in the current cache structure it's using an ink_atomic_swap(new_table, old_table). This function does not actually swap, it only does a set, so it effectively overwrites the new table with the old table, and then continues, never updating. This is why reloading with a new hosting.config never sees an update in use.
This PR changes that to get rid of the ink_atomic use and just use a std_atomic for the table, replaces the host table ptr, and deletes the old one
closes #7220
suggestion from @SolidWallOfCode to take a look at the ipallow logic and see if we can do similar here
Finally getting back to this, using the ipallow logic would take a very large rewrite from what I can tell. IMHO we should just do the simplest fix of swapping the values to the 'atomic_swap', the way it was meant to be used in the first place, to at least have this working. Then when we get around to a full hosting rewrite can look at doing it better then
What we should really do is change it to a std::shared_ptr with a read/write mutex. This fix retains the arbitrary timeout which could lead to issues.
[approve ci]
Is this pr still needed now that https://github.com/apache/trafficserver/pull/9046 has been merged?
Is this pr still needed now that #9046 has been merged?
nope, closing