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 // else we are the leader of the write batch group
assert(w.state == WriteThread::STATE_GROUP_LEADER); assert(w.state == WriteThread::STATE_GROUP_LEADER);
WriteContext write_context;
WriteThread::WriteGroup write_group; WriteThread::WriteGroup write_group;
uint64_t last_sequence; uint64_t last_sequence;
nonmem_write_thread_.EnterAsBatchGroupLeader(&w, &write_group); nonmem_write_thread_.EnterAsBatchGroupLeader(&w, &write_group);

@ -199,10 +199,10 @@ class FullFilterBitsReader : public FilterBitsReader {
uint32_t* num_lines); uint32_t* num_lines);
// "filter" contains the data appended by a preceding call to // "filter" contains the data appended by a preceding call to
// CreateFilterFromHash() on this class. This method must return true if // FilterBitsBuilder::Finish. This method must return true if the key was
// the key was in the list of keys passed to CreateFilter(). // passed to FilterBitsBuilder::AddKey. This method may return true or false
// This method may return true or false if the key was not on the // if the key was not on the list, but it should aim to return false with a
// list, but it should aim to return false with a high probability. // high probability.
// //
// hash: target to be checked // hash: target to be checked
// filter: the whole filter, including meta data bytes // filter: the whole filter, including meta data bytes

@ -1754,7 +1754,7 @@ Status BackupEngineImpl::BackupMeta::StoreToFile(bool sync) {
std::string hex_encoded_metadata = std::string hex_encoded_metadata =
Slice(app_metadata_).ToString(/* hex */ true); 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; size_t hex_meta_strlen = kMetaDataPrefix.ToString().length() + hex_encoded_metadata.length() + 1;
if (hex_meta_strlen >= buf_size) { if (hex_meta_strlen >= buf_size) {
return Status::Corruption("Buffer too small to fit backup metadata"); return Status::Corruption("Buffer too small to fit backup metadata");

@ -163,7 +163,7 @@ PersistentCache::StatsType BlockCacheTier::Stats() {
stats_.read_hit_latency_.Average()); stats_.read_hit_latency_.Average());
Add(&stats, "persistentcache.blockcachetier.read_miss_latency", Add(&stats, "persistentcache.blockcachetier.read_miss_latency",
stats_.read_miss_latency_.Average()); stats_.read_miss_latency_.Average());
Add(&stats, "persistenetcache.blockcachetier.write_latency", Add(&stats, "persistentcache.blockcachetier.write_latency",
stats_.write_latency_.Average()); stats_.write_latency_.Average());
auto out = PersistentCacheTier::Stats(); auto out = PersistentCacheTier::Stats();

Loading…
Cancel
Save