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
main
Jingguo Yao 6 years ago committed by Facebook Github Bot
parent a15354d04e
commit ceb5fea1e3
  1. 1
      db/db_impl_write.cc
  2. 8
      util/bloom.cc
  3. 2
      utilities/backupable/backupable_db.cc
  4. 2
      utilities/persistent_cache/block_cache_tier.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);

@ -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

@ -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");

@ -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();

Loading…
Cancel
Save