Skip to content

Commit 092f97e

Browse files
author
Jonah Cohen
committed
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
1 parent 6cc1286 commit 092f97e

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

db/column_family.h

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

db/compaction_picker.cc

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

include/rocksdb/db.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class DB {
123123

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

include/rocksdb/options.h

+5-10
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,12 @@ struct ColumnFamilyOptions {
224224
CompressionType compression;
225225

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

240235
// different options for compression algorithms

0 commit comments

Comments
 (0)