Clarifying comments in db.h (#6768)

Summary:
And fix a confusingly worded log message
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6768

Reviewed By: anand1976

Differential Revision: D21284527

Pulled By: pdillinger

fbshipit-source-id: f03c1422c229a901c3a65e524740452349626164
main
Peter Dillinger 5 years ago committed by Facebook GitHub Bot
parent bae6f58696
commit b810e62b39
  1. 2
      db/compaction/compaction_picker_universal.cc
  2. 13
      include/rocksdb/db.h

@ -389,7 +389,7 @@ Compaction* UniversalCompactionBuilder::PickCompaction() {
VersionStorageInfo::LevelSummaryStorage tmp; VersionStorageInfo::LevelSummaryStorage tmp;
ROCKS_LOG_BUFFER_MAX_SZ( ROCKS_LOG_BUFFER_MAX_SZ(
log_buffer_, 3072, log_buffer_, 3072,
"[%s] Universal: sorted runs files(%" ROCKSDB_PRIszt "): %s\n", "[%s] Universal: sorted runs: %" ROCKSDB_PRIszt " files: %s\n",
cf_name_.c_str(), sorted_runs_.size(), vstorage_->LevelSummary(&tmp)); cf_name_.c_str(), sorted_runs_.size(), vstorage_->LevelSummary(&tmp));
Compaction* c = nullptr; Compaction* c = nullptr;

@ -127,9 +127,11 @@ struct GetMergeOperandsOptions {
typedef std::unordered_map<std::string, std::shared_ptr<const TableProperties>> typedef std::unordered_map<std::string, std::shared_ptr<const TableProperties>>
TablePropertiesCollection; TablePropertiesCollection;
// A DB is a persistent ordered map from keys to values. // A DB is a persistent, versioned ordered map from keys to values.
// A DB is safe for concurrent access from multiple threads without // A DB is safe for concurrent access from multiple threads without
// any external synchronization. // any external synchronization.
// DB is an abstract base class with one primary implementation (DBImpl)
// and a number of wrapper implementations.
class DB { class DB {
public: public:
// Open the database with the specified "name". // Open the database with the specified "name".
@ -255,6 +257,7 @@ class DB {
const std::string& name, const std::string& name,
std::vector<std::string>* column_families); std::vector<std::string>* column_families);
// Abstract class ctor
DB() {} DB() {}
// No copying allowed // No copying allowed
DB(const DB&) = delete; DB(const DB&) = delete;
@ -457,6 +460,11 @@ class DB {
GetMergeOperandsOptions* get_merge_operands_options, GetMergeOperandsOptions* get_merge_operands_options,
int* number_of_operands) = 0; int* number_of_operands) = 0;
// Consistent Get of many keys across column families without the need
// for an explicit snapshot. NOTE: the implementation of this MultiGet API
// does not have the performance benefits of the void-returning MultiGet
// functions.
//
// If keys[i] does not exist in the database, then the i'th returned // If keys[i] does not exist in the database, then the i'th returned
// status will be one for which Status::IsNotFound() is true, and // status will be one for which Status::IsNotFound() is true, and
// (*values)[i] will be set to some arbitrary value (often ""). Otherwise, // (*values)[i] will be set to some arbitrary value (often ""). Otherwise,
@ -1139,7 +1147,8 @@ class DB {
// This function will wait until all currently running background processes // This function will wait until all currently running background processes
// finish. After it returns, no background process will be run until // finish. After it returns, no background process will be run until
// ContinueBackgroundWork is called // ContinueBackgroundWork is called, once for each preceding OK-returning
// call to PauseBackgroundWork.
virtual Status PauseBackgroundWork() = 0; virtual Status PauseBackgroundWork() = 0;
virtual Status ContinueBackgroundWork() = 0; virtual Status ContinueBackgroundWork() = 0;

Loading…
Cancel
Save