Closed v01dstar closed 10 months ago
I don't get the overall idea. To me it seems the logic has no difference.
Before the change, it will only check
"if (alive_files.find(file_number) != alive_files.end()) continue;"
The original code makes new_manifest_file_number part of alive_files.
But now, alive_files do not ocntain new_manifest_file_number, but the code check it and skip explicitly.
if (file_number == new_manifest_file_number && file_type == kDescriptorFile)
I don't get the overall idea. To me it seems the logic has no difference. Before the change, it will only check
"if (alive_files.find(file_number) != alive_files.end()) continue;"
The original code makes new_manifest_file_number part of alive_files.But now, alive_files do not ocntain new_manifest_file_number, but the code check it and skip explicitly.
if (file_number == new_manifest_file_number && file_type == kDescriptorFile)
It was an orphaned blob file that can not be GCed since it has the same file number as the manifest (they have different prefix and suffix though). Now, alive_files
only contains blob files that are listed in the manifest (applied files), and special-case the newly created manifest.
Close https://github.com/tikv/tikv/issues/16256