Skip to content

Commit

Permalink
[core] Add comments in DeletionVectorIndexFileWriter.emptyIndexFile
Browse files Browse the repository at this point in the history
  • Loading branch information
JingsongLi committed May 30, 2024
1 parent 22c7c61 commit 2da5098
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ private IndexFileMeta tryWriter(Iterator<Map.Entry<String, DeletionVector>> iter
return writer.writtenIndexFile();
}

/**
* The deletion file of the bucketed table is updated according to the bucket. If a compaction
* occurs and there is no longer a deletion file, an empty deletion file needs to be generated
* to overwrite the old file.
*
* <p>TODO: We can consider sending a message to delete the deletion file in the future.
*/
private List<IndexFileMeta> emptyIndexFile() throws IOException {
try (SingleIndexFileWriter writer = new SingleIndexFileWriter()) {
return Collections.singletonList(writer.writtenIndexFile());
Expand Down

0 comments on commit 2da5098

Please sign in to comment.