From ceb5fea1e3b68e1405e22afda0d46b1fab1ab5bb Mon Sep 17 00:00:00 2001 From: Jingguo Yao Date: Mon, 6 Aug 2018 10:57:22 -0700 Subject: [PATCH] Improve FullFilterBitsReader::HashMayMatch's doc (#4202) Summary: HashMayMatch is related to AddKey() instead of CreateFilter(). Also applies some minor Fixes #4191 #4200 #3910 Pull Request resolved: https://github.com/facebook/rocksdb/pull/4202 Differential Revision: D9180945 Pulled By: maysamyabandeh fbshipit-source-id: 6f07b81c5bb9bda5c0273475b486ba8a030471e6 --- db/db_impl_write.cc | 1 - util/bloom.cc | 8 ++++---- utilities/backupable/backupable_db.cc | 2 +- utilities/persistent_cache/block_cache_tier.cc | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/db/db_impl_write.cc b/db/db_impl_write.cc index aa5ac27fa..de4c9b3c8 100644 --- a/db/db_impl_write.cc +++ b/db/db_impl_write.cc @@ -573,7 +573,6 @@ Status DBImpl::WriteImplWALOnly(const WriteOptions& write_options, } // else we are the leader of the write batch group assert(w.state == WriteThread::STATE_GROUP_LEADER); - WriteContext write_context; WriteThread::WriteGroup write_group; uint64_t last_sequence; nonmem_write_thread_.EnterAsBatchGroupLeader(&w, &write_group); diff --git a/util/bloom.cc b/util/bloom.cc index 9757d4b61..a20533341 100644 --- a/util/bloom.cc +++ b/util/bloom.cc @@ -199,10 +199,10 @@ class FullFilterBitsReader : public FilterBitsReader { uint32_t* num_lines); // "filter" contains the data appended by a preceding call to - // CreateFilterFromHash() on this class. This method must return true if - // the key was in the list of keys passed to CreateFilter(). - // This method may return true or false if the key was not on the - // list, but it should aim to return false with a high probability. + // FilterBitsBuilder::Finish. This method must return true if the key was + // passed to FilterBitsBuilder::AddKey. This method may return true or false + // if the key was not on the list, but it should aim to return false with a + // high probability. // // hash: target to be checked // filter: the whole filter, including meta data bytes diff --git a/utilities/backupable/backupable_db.cc b/utilities/backupable/backupable_db.cc index d7cf79563..efc73b236 100644 --- a/utilities/backupable/backupable_db.cc +++ b/utilities/backupable/backupable_db.cc @@ -1754,7 +1754,7 @@ Status BackupEngineImpl::BackupMeta::StoreToFile(bool sync) { std::string hex_encoded_metadata = Slice(app_metadata_).ToString(/* hex */ true); - // +1 to accomodate newline character + // +1 to accommodate newline character size_t hex_meta_strlen = kMetaDataPrefix.ToString().length() + hex_encoded_metadata.length() + 1; if (hex_meta_strlen >= buf_size) { return Status::Corruption("Buffer too small to fit backup metadata"); diff --git a/utilities/persistent_cache/block_cache_tier.cc b/utilities/persistent_cache/block_cache_tier.cc index 714af2c62..1ebf8ae6b 100644 --- a/utilities/persistent_cache/block_cache_tier.cc +++ b/utilities/persistent_cache/block_cache_tier.cc @@ -163,7 +163,7 @@ PersistentCache::StatsType BlockCacheTier::Stats() { stats_.read_hit_latency_.Average()); Add(&stats, "persistentcache.blockcachetier.read_miss_latency", stats_.read_miss_latency_.Average()); - Add(&stats, "persistenetcache.blockcachetier.write_latency", + Add(&stats, "persistentcache.blockcachetier.write_latency", stats_.write_latency_.Average()); auto out = PersistentCacheTier::Stats();