Refactor the sentinel-retrying/giving-up logic for better code reuse
Refactor sentinel attempt implementation (merging from a branch)

Minor changes following the merge too.
Refactor sentinel retries to clean up the sentinel code
Remove TODO line that's dealt with