This:
- documents what this method is about in the code (only in documentation so far)
- adds a missing test on the cli swh db version to check this behaves appropriately
- will allow to clean up duplicated code in existing backends (storage, indexer) [2] [3]
- will allow to fix the backends which are missing the appropriate methods (scheduler
[4], scrubber, vault, see [1]'s description for details...)
Related to T4228
Depends on D7943 (revert of [1])
This is the proper fix instead of [1].
[1] D7907
[4] https://forge.softwareheritage.org/source/swh-scheduler/browse/master/swh/scheduler/backend.py$76-78