]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Remove Ticker::SEQUENCE_NUMBER
authorYi Wu <yiwu@fb.com>
Thu, 17 Nov 2016 06:34:18 +0000 (22:34 -0800)
committerIslam AbdelRahman <tec@fb.com>
Fri, 9 Dec 2016 20:55:55 +0000 (12:55 -0800)
Summary:
Remove the ticker count because:
* Having to reset the ticker count in WriteImpl is ineffiecent;
* It doesn't make sense to have it as a ticker count if multiple db
  instance share a statistics object.
Closes https://github.com/facebook/rocksdb/pull/1531

Differential Revision: D4194442

Pulled By: yiwu-arbug

fbshipit-source-id: e2110a9

db/db_impl.cc
include/rocksdb/statistics.h
java/src/main/java/org/rocksdb/TickerType.java

index 91855df15659a125cc5d279a0d9e291419ab54b0..5e0ced6c73f75a2d0405dd4f52bb8262be9fe67e 100644 (file)
@@ -1348,7 +1348,6 @@ Status DBImpl::Recover(
         }
       }
     }
-    SetTickerCount(stats_, SEQUENCE_NUMBER, versions_->LastSequence());
   }
 
   // Initial value
@@ -4630,7 +4629,6 @@ Status DBImpl::WriteImpl(const WriteOptions& write_options,
     if (write_thread_.CompleteParallelWorker(&w)) {
       // we're responsible for early exit
       auto last_sequence = w.parallel_group->last_sequence;
-      SetTickerCount(stats_, SEQUENCE_NUMBER, last_sequence);
       versions_->SetLastSequence(last_sequence);
       write_thread_.EarlyExitParallelGroup(&w);
     }
@@ -4966,7 +4964,6 @@ Status DBImpl::WriteImpl(const WriteOptions& write_options,
       }
 
       if (!exit_completed_early && w.status.ok()) {
-        SetTickerCount(stats_, SEQUENCE_NUMBER, last_sequence);
         versions_->SetLastSequence(last_sequence);
         if (!need_log_sync) {
           write_thread_.ExitAsBatchGroupLeader(&w, last_writer, w.status);
index 238b2c71b5365372c2161e37d145e3a995cf39d7..25bc4a8ec6c5adc178a4e62158fd302d30fd19d0 100644 (file)
@@ -152,7 +152,6 @@ enum Tickers : uint32_t {
   // written to storage because key does not exist
   NUMBER_FILTERED_DELETES,
   NUMBER_MERGE_FAILURES,
-  SEQUENCE_NUMBER,
 
   // number of times bloom was checked before creating iterator on a
   // file, and the number of times the check was useful in avoiding
@@ -280,7 +279,6 @@ const std::vector<std::pair<Tickers, std::string>> TickersNameMap = {
     {NUMBER_MULTIGET_BYTES_READ, "rocksdb.number.multiget.bytes.read"},
     {NUMBER_FILTERED_DELETES, "rocksdb.number.deletes.filtered"},
     {NUMBER_MERGE_FAILURES, "rocksdb.number.merge.failures"},
-    {SEQUENCE_NUMBER, "rocksdb.sequence.number"},
     {BLOOM_FILTER_PREFIX_CHECKED, "rocksdb.bloom.filter.prefix.checked"},
     {BLOOM_FILTER_PREFIX_USEFUL, "rocksdb.bloom.filter.prefix.useful"},
     {NUMBER_OF_RESEEKS_IN_ITERATION, "rocksdb.number.reseeks.iteration"},
index 9ff819a202d8584c18175f1c345bbfa5f24728b4..7cca743702086f2ba6fddc37abd5ea0c9867a64d 100644 (file)
@@ -87,7 +87,6 @@ public enum TickerType {
   // written to storage because key does not exist
   NUMBER_FILTERED_DELETES(36),
   NUMBER_MERGE_FAILURES(37),
-  SEQUENCE_NUMBER(38),
 
   // number of times bloom was checked before creating iterator on a
   // file, and the number of times the check was useful in avoiding