Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't MarkForDeletion a chunk until all references to it have been swapped #1914
Don't MarkForDeletion a chunk until all references to it have been swapped out. This avoids it still being accessible for reads resulting in FileBeingDeletedException.
I'm 99% we've been hitting this whilst scavenging. The scenario is:
This is obviously a problem for any read operation on the chunk, not just the scavenge process.
The fix is simple; don't MarkForDeletion until all references in the DB are swapped.