Add class-level comments to version-related classes (#5348)

Summary:
As title.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5348

Differential Revision: D15564595

Pulled By: riversand963

fbshipit-source-id: dd45aa86a70e0343c2e9ef702fad165163f548e6
main
Yanqin Jin 6 years ago committed by Facebook Github Bot
parent 1b59a490ef
commit f1302ebab8
  1. 12
      db/version_set.h

@ -91,6 +91,9 @@ extern void DoGenerateLevelFilesBrief(LevelFilesBrief* file_level,
const std::vector<FileMetaData*>& files, const std::vector<FileMetaData*>& files,
Arena* arena); Arena* arena);
// Information of the storage associated with each Version, including number of
// levels of LSM tree, files information at each level, files marked for
// compaction, etc.
class VersionStorageInfo { class VersionStorageInfo {
public: public:
VersionStorageInfo(const InternalKeyComparator* internal_comparator, VersionStorageInfo(const InternalKeyComparator* internal_comparator,
@ -537,6 +540,8 @@ class VersionStorageInfo {
}; };
using MultiGetRange = MultiGetContext::Range; using MultiGetRange = MultiGetContext::Range;
// A column family's version consists of the SST files owned by the column
// family at a certain point in time.
class Version { class Version {
public: public:
// Append to *iters a sequence of iterators that will // Append to *iters a sequence of iterators that will
@ -747,6 +752,9 @@ struct ObsoleteFileInfo {
class BaseReferencedVersionBuilder; class BaseReferencedVersionBuilder;
// VersionSet is the collection of versions of all the column families of the
// database. Each database owns one VersionSet. A VersionSet has access to all
// column families via ColumnFamilySet, i.e. set of the column families.
class VersionSet { class VersionSet {
public: public:
VersionSet(const std::string& dbname, const ImmutableDBOptions* db_options, VersionSet(const std::string& dbname, const ImmutableDBOptions* db_options,
@ -1103,6 +1111,10 @@ class VersionSet {
VersionEdit* edit, InstrumentedMutex* mu); VersionEdit* edit, InstrumentedMutex* mu);
}; };
// ReactiveVersionSet represents a collection of versions of the column
// families of the database. Users of ReactiveVersionSet, e.g. DBImplSecondary,
// need to replay the MANIFEST (description log in older terms) in order to
// reconstruct and install versions.
class ReactiveVersionSet : public VersionSet { class ReactiveVersionSet : public VersionSet {
public: public:
ReactiveVersionSet(const std::string& dbname, ReactiveVersionSet(const std::string& dbname,

Loading…
Cancel
Save