borg2 deletes the old index fragments before writing a new one. it could be interrupted before it has deleted them all and the left over fragments would then be considered by borg as a complete index although it is incomplete.
Solution:
A partial index-fragment delete leaving a subset that gets trusted as complete could be caught by writing an "index invalidated" sentinel before deleting, so a rebuild is forced if the invalidation didn't finish.
borg2 deletes the old index fragments before writing a new one. it could be interrupted before it has deleted them all and the left over fragments would then be considered by borg as a complete index although it is incomplete.
Solution:
A partial index-fragment delete leaving a subset that gets trusted as complete could be caught by writing an "index invalidated" sentinel before deleting, so a rebuild is forced if the invalidation didn't finish.