cmcfarlen commented on PR #13583:
URL: https://github.com/apache/trafficserver/pull/13583#issuecomment-5531920999

   Removed in 2d05898c94.
   
   You are right that locking `rename()` cannot fix this. The readers you point 
at — `name()` and `lookup(id, &out_name)` — are unlocked on purpose; they are 
the paths this PR exists to keep off the mutex. So the choice was immutable 
name storage with its own lifetime rules, or dropping the function. For 
something with no caller outside the tests, an atomic name pointer per slot 
plus never reclaiming replaced strings is a lot of machinery to carry.
   
   Dropping it leaves the invariant those readers actually need, which is worth 
stating rather than assuming: a slot's name is written once, before the release 
store that publishes it, and never changes afterwards. So the unlocked reads 
are correct by construction, and the `string_view` keys in `_lookups` stay 
valid for the life of the process. `_lookups.erase` disappeared with 
`rename()`, so that map only grows now.
   
   That is the second removal from an installed header in this PR, after 
`createSpan`, and the two are related: `createSpan` handed out unnamed slots 
that only `rename()` could ever have named. Both are noted for the 11.0.0 
release notes, and the description is updated — it had listed removing 
`rename()` among the things this PR deliberately did not do, which review has 
overtaken.
   
   Full `test_tsutil` and `test_records` pass and the tree builds.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to