URL:
https://github.com/SSSD/sssd/pull/977
Title: #977: sss_ptr_hash: internal refactoring
alexey-tikhonov commented:
"""
Do I understand correctly that idea is to assure that the only
possible execution chain to get into `sss_ptr_hash_delete_cb()` is:
**`talloc_free(sss_ptr_hash_value)`** `-> sss_ptr_hash_value_destructor() ->
hash_delete()`
(so that `sss_ptr_hash_delete_cb()` doesn't need to check if execution is/is not in
`talloc_free(sss_ptr_hash_value)` context)?
Well, this is not that straightforward. We still could get to `sss_ptr_hash_delete_cb()`
via explicit `hash_delete()` or implicitly via table d-tor -> `hash_delete()`...
Of course it was possible to detect and handle this keeping/using `being_destructed` flag
but IMO this would defeat purpose of proposed improvements. So I changed implementation of
table d-tor and documented it is not allowed to call `hash_delete()` explicitly...
Overall I think I like this version better.
I kept all the patches separately to easier review but probably it makes sense to squash
it into one.
Some downstream tests didn't finish yet, but I think new version is ready for
review.
"""
See the full comment at
https://github.com/SSSD/sssd/pull/977#issuecomment-585612874