mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 22:44:05 +00:00
Make ReadRangeDelAggregator::ShouldDelete() more inline friendly (#5202)
Summary: Reorganize the code so that no function call into ReadRangeDelAggregator is needed if there is no tomb range stone. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5202 Differential Revision: D14968155 Pulled By: siying fbshipit-source-id: 0bd61911293c7a27b4e1b8d57c66d0c4ad6a6a5f
This commit is contained in:
parent
01cfea6637
commit
d6862b3f51
|
@ -322,8 +322,8 @@ void ReadRangeDelAggregator::AddTombstones(
|
|||
std::move(input_iter), icmp_, smallest, largest)));
|
||||
}
|
||||
|
||||
bool ReadRangeDelAggregator::ShouldDelete(const ParsedInternalKey& parsed,
|
||||
RangeDelPositioningMode mode) {
|
||||
bool ReadRangeDelAggregator::ShouldDeleteImpl(const ParsedInternalKey& parsed,
|
||||
RangeDelPositioningMode mode) {
|
||||
return rep_.ShouldDelete(parsed, mode);
|
||||
}
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ class RangeDelAggregator {
|
|||
std::set<uint64_t> files_seen_;
|
||||
};
|
||||
|
||||
class ReadRangeDelAggregator : public RangeDelAggregator {
|
||||
class ReadRangeDelAggregator final : public RangeDelAggregator {
|
||||
public:
|
||||
ReadRangeDelAggregator(const InternalKeyComparator* icmp,
|
||||
SequenceNumber upper_bound)
|
||||
|
@ -364,7 +364,12 @@ class ReadRangeDelAggregator : public RangeDelAggregator {
|
|||
const InternalKey* largest = nullptr) override;
|
||||
|
||||
bool ShouldDelete(const ParsedInternalKey& parsed,
|
||||
RangeDelPositioningMode mode) override;
|
||||
RangeDelPositioningMode mode) final override {
|
||||
if (rep_.IsEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return ShouldDeleteImpl(parsed, mode);
|
||||
}
|
||||
|
||||
bool IsRangeOverlapped(const Slice& start, const Slice& end);
|
||||
|
||||
|
@ -374,6 +379,9 @@ class ReadRangeDelAggregator : public RangeDelAggregator {
|
|||
|
||||
private:
|
||||
StripeRep rep_;
|
||||
|
||||
bool ShouldDeleteImpl(const ParsedInternalKey& parsed,
|
||||
RangeDelPositioningMode mode);
|
||||
};
|
||||
|
||||
class CompactionRangeDelAggregator : public RangeDelAggregator {
|
||||
|
|
Loading…
Reference in a new issue