RangeDelAggregator::StripeRep::Invalidate() to be skipped if empty (#5312)

Summary:
RangeDelAggregator::StripeRep::Invalidate() clears up several vectors. If we know there isn't anything to there, we can safe these small CPUs. Profiling shows that it sometimes take non-negligible amount of CPU. Worth a small optimization.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5312

Differential Revision: D15380511

Pulled By: siying

fbshipit-source-id: 53c5f34c33b4cb1e743643c6086ac56d0b84ec2e
main
Siying Dong 6 years ago committed by Facebook Github Bot
parent 29a198564d
commit f82e693a31
  1. 6
      db/range_del_aggregator.h

@ -320,8 +320,10 @@ class RangeDelAggregator {
RangeDelPositioningMode mode);
void Invalidate() {
InvalidateForwardIter();
InvalidateReverseIter();
if (!IsEmpty()) {
InvalidateForwardIter();
InvalidateReverseIter();
}
}
bool IsRangeOverlapped(const Slice& start, const Slice& end);

Loading…
Cancel
Save