Skip to content

Commit

Permalink
Fix the compactRange with wrong cf handle when ClipColumnFamily (#12219)
Browse files Browse the repository at this point in the history
Summary:
- **Context**:

In ClipColumnFamily, the DeleteRange API will be used to delete data, and then CompactRange will be called for physical deletion. But now However, the ColumnFamilyHandle is not passed , so by default only the DefaultColumnFamily will be CompactRanged. Therefore, it may cause that the data in some sst files of CompactionRange cannot be physically deleted.

- **In this change**

Pass the ColumnFamilyHandle when call CompactRange

Pull Request resolved: #12219

Reviewed By: ajkr

Differential Revision: D52665162

Pulled By: cbi42

fbshipit-source-id: e8e997aa25ec4ca40e347be89edc7e84a7a0edce
  • Loading branch information
mayuehappy authored and facebook-github-bot committed Jan 10, 2024
1 parent fa0190f commit 1a1f9f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db_impl/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6280,7 +6280,7 @@ Status DBImpl::ClipColumnFamily(ColumnFamilyHandle* column_family,
// last level to compact to and that range tombstones are not dropped
// during non-bottommost compactions, calling CompactRange() on these two
// ranges may not clear all range tombstones.
status = CompactRange(compact_options, nullptr, nullptr);
status = CompactRange(compact_options, column_family, nullptr, nullptr);
}
return status;
}
Expand Down

0 comments on commit 1a1f9f1

Please sign in to comment.