Fix comments and typos

Summary: Correct some comments and typos in RocksDB.

Test Plan: Inspection

Reviewers: sdong, igor

Reviewed By: igor

Differential Revision: https://reviews.facebook.net/D23133
main
Jonah Cohen 10 years ago
parent 6cc12860f0
commit 092f97e219
  1. 2
      db/column_family.h
  2. 4
      db/compaction_picker.cc
  3. 2
      include/rocksdb/db.h
  4. 15
      include/rocksdb/options.h

@ -133,7 +133,7 @@ class ColumnFamilyData {
void Ref() { ++refs_; } void Ref() { ++refs_; }
// will just decrease reference count to 0, but will not delete it. returns // will just decrease reference count to 0, but will not delete it. returns
// true if the ref count was decreased to zero. in that case, it can be // true if the ref count was decreased to zero. in that case, it can be
// deleted by the caller immediatelly, or later, by calling // deleted by the caller immediately, or later, by calling
// FreeDeadColumnFamilies() // FreeDeadColumnFamilies()
bool Unref() { bool Unref() {
assert(refs_ > 0); assert(refs_ > 0);

@ -42,13 +42,13 @@ CompressionType GetCompressionType(const Options& options, int level,
return kNoCompression; return kNoCompression;
} }
// If the use has specified a different compression level for each level, // If the use has specified a different compression level for each level,
// then pick the compresison for that level. // then pick the compression for that level.
if (!options.compression_per_level.empty()) { if (!options.compression_per_level.empty()) {
const int n = options.compression_per_level.size() - 1; const int n = options.compression_per_level.size() - 1;
// It is possible for level_ to be -1; in that case, we use level // It is possible for level_ to be -1; in that case, we use level
// 0's compression. This occurs mostly in backwards compatibility // 0's compression. This occurs mostly in backwards compatibility
// situations when the builder doesn't know what level the file // situations when the builder doesn't know what level the file
// belongs to. Likewise, if level_ is beyond the end of the // belongs to. Likewise, if level is beyond the end of the
// specified compression levels, use the last value. // specified compression levels, use the last value.
return options.compression_per_level[std::max(0, std::min(level, n))]; return options.compression_per_level[std::max(0, std::min(level, n))];
} else { } else {

@ -123,7 +123,7 @@ class DB {
// Open DB with column families. // Open DB with column families.
// db_options specify database specific options // db_options specify database specific options
// column_families is the vector of all column families in the databse, // column_families is the vector of all column families in the database,
// containing column family name and options. You need to open ALL column // containing column family name and options. You need to open ALL column
// families in the database. To get the list of column families, you can use // families in the database. To get the list of column families, you can use
// ListColumnFamilies(). Also, you can open only a subset of column families // ListColumnFamilies(). Also, you can open only a subset of column families

@ -224,17 +224,12 @@ struct ColumnFamilyOptions {
CompressionType compression; CompressionType compression;
// Different levels can have different compression policies. There // Different levels can have different compression policies. There
// are cases where most lower levels would like to quick compression // are cases where most lower levels would like to use quick compression
// algorithm while the higher levels (which have more data) use // algorithms while the higher levels (which have more data) use
// compression algorithms that have better compression but could // compression algorithms that have better compression but could
// be slower. This array, if non nullptr, should have an entry for // be slower. This array, if non-empty, should have an entry for
// each level of the database. This array, if non nullptr, overides the // each level of the database; these override the value specified in
// value specified in the previous field 'compression'. The caller is // the previous field 'compression'.
// reponsible for allocating memory and initializing the values in it
// before invoking Open(). The caller is responsible for freeing this
// array and it could be freed anytime after the return from Open().
// This could have been a std::vector but that makes the equivalent
// java/C api hard to construct.
std::vector<CompressionType> compression_per_level; std::vector<CompressionType> compression_per_level;
// different options for compression algorithms // different options for compression algorithms

Loading…
Cancel
Save