diff --git a/db/column_family.h b/db/column_family.h index 4449e2ceb..a2215b0a8 100644 --- a/db/column_family.h +++ b/db/column_family.h @@ -480,11 +480,8 @@ class ColumnFamilyData { const MutableCFOptions& mutable_cf_options, const ImmutableCFOptions& immutable_cf_options); - // Recalculate some small conditions, which are changed only during - // compaction, adding new memtable and/or - // recalculation of compaction score. These values are used in - // DBImpl::MakeRoomForWrite function to decide, if it need to make - // a write stall + // Recalculate some stall conditions, which are changed only during + // compaction, adding new memtable and/or recalculation of compaction score. WriteStallCondition RecalculateWriteStallConditions( const MutableCFOptions& mutable_cf_options); diff --git a/db/db_impl/db_impl_compaction_flush.cc b/db/db_impl/db_impl_compaction_flush.cc index 487f8102f..57a750065 100644 --- a/db/db_impl/db_impl_compaction_flush.cc +++ b/db/db_impl/db_impl_compaction_flush.cc @@ -2237,7 +2237,7 @@ Status DBImpl::AtomicFlushMemTables( // This method tries to avoid write stall (similar to CompactRange() behavior) // it emulates how the SuperVersion / LSM would change if flush happens, checks // it against various constrains and delays flush if it'd cause write stall. -// Called should check status and flush_needed to see if flush already happened. +// Caller should check status and flush_needed to see if flush already happened. Status DBImpl::WaitUntilFlushWouldNotStallWrites(ColumnFamilyData* cfd, bool* flush_needed) { { diff --git a/db/db_options_test.cc b/db/db_options_test.cc index 229ad904e..8ec184757 100644 --- a/db/db_options_test.cc +++ b/db/db_options_test.cc @@ -453,7 +453,7 @@ TEST_F(DBOptionsTest, WritableFileMaxBufferSize) { dbfull()->SetDBOptions({{"writable_file_max_buffer_size", "524288"}})); buffer_size = 512 * 1024; match_cnt = 0; - unmatch_cnt = 0; // SetDBOptions() will create a WriteableFileWriter + unmatch_cnt = 0; // SetDBOptions() will create a WritableFileWriter ASSERT_EQ(buffer_size, dbfull()->GetDBOptions().writable_file_max_buffer_size); diff --git a/db/log_writer.h b/db/log_writer.h index 6f7e9d103..877be1755 100644 --- a/db/log_writer.h +++ b/db/log_writer.h @@ -28,7 +28,7 @@ namespace log { /** * Writer is a general purpose log stream writer. It provides an append-only * abstraction for writing data. The details of the how the data is written is - * handled by the WriteableFile sub-class implementation. + * handled by the WritableFile sub-class implementation. * * File format: * diff --git a/db/version_edit.h b/db/version_edit.h index 2d373d9b4..9891d299a 100644 --- a/db/version_edit.h +++ b/db/version_edit.h @@ -316,7 +316,7 @@ struct FileMetaData { }; // A compressed copy of file meta data that just contain minimum data needed -// to server read operations, while still keeping the pointer to full metadata +// to serve read operations, while still keeping the pointer to full metadata // of the file in case it is needed. struct FdWithKeyRange { FileDescriptor fd; diff --git a/env/env_test.cc b/env/env_test.cc index 3ae6c1e8d..16741cf9e 100644 --- a/env/env_test.cc +++ b/env/env_test.cc @@ -1980,7 +1980,7 @@ TEST_P(EnvPosixTestWithParam, PosixRandomRWFile) { // Cannot open non-existing file. ASSERT_NOK(env_->NewRandomRWFile(path, &file, EnvOptions())); - // Create the file using WriteableFile + // Create the file using WritableFile { std::unique_ptr wf; ASSERT_OK(env_->NewWritableFile(path, &wf, EnvOptions())); @@ -2109,7 +2109,7 @@ TEST_P(EnvPosixTestWithParam, PosixRandomRWFileRandomized) { ASSERT_NOK(env_->NewRandomRWFile(path, &file, EnvOptions())); #endif - // Create the file using WriteableFile + // Create the file using WritableFile { std::unique_ptr wf; ASSERT_OK(env_->NewWritableFile(path, &wf, EnvOptions())); diff --git a/file/random_access_file_reader.h b/file/random_access_file_reader.h index f3c24d1bd..0d85600fb 100644 --- a/file/random_access_file_reader.h +++ b/file/random_access_file_reader.h @@ -38,7 +38,7 @@ FSReadRequest Align(const FSReadRequest& r, size_t alignment); // Otherwise, do nothing and return false. bool TryMerge(FSReadRequest* dest, const FSReadRequest& src); -// RandomAccessFileReader is a wrapper on top of Env::RandomAccessFile. It is +// RandomAccessFileReader is a wrapper on top of FSRandomAccessFile. It is // responsible for: // - Handling Buffered and Direct reads appropriately. // - Rate limiting compaction reads. diff --git a/include/rocksdb/env.h b/include/rocksdb/env.h index 04198d32d..52b0852d2 100644 --- a/include/rocksdb/env.h +++ b/include/rocksdb/env.h @@ -876,7 +876,7 @@ class WritableFile { virtual ~WritableFile(); // Append data to the end of the file - // Note: A WriteableFile object must support either Append or + // Note: A WritableFile object must support either Append or // PositionedAppend, so the users cannot mix the two. virtual Status Append(const Slice& data) = 0; diff --git a/include/rocksdb/file_system.h b/include/rocksdb/file_system.h index 19f4a402a..45cde241d 100644 --- a/include/rocksdb/file_system.h +++ b/include/rocksdb/file_system.h @@ -951,7 +951,7 @@ class FSWritableFile { virtual ~FSWritableFile() {} // Append data to the end of the file - // Note: A WriteableFile object must support either Append or + // Note: A WritableFile object must support either Append or // PositionedAppend, so the users cannot mix the two. virtual IOStatus Append(const Slice& data, const IOOptions& options, IODebugContext* dbg) = 0; diff --git a/port/win/env_win.cc b/port/win/env_win.cc index 017e1200f..f856d8ccb 100644 --- a/port/win/env_win.cc +++ b/port/win/env_win.cc @@ -410,7 +410,7 @@ IOStatus WinFileSystem::OpenWritableFile( if (INVALID_HANDLE_VALUE == hFile) { auto lastError = GetLastError(); return IOErrorFromWindowsError( - "Failed to create a NewWriteableFile: " + fname, lastError); + "Failed to create a NewWritableFile: " + fname, lastError); } // We will start writing at the end, appending diff --git a/table/block_based/block_based_table_factory.cc b/table/block_based/block_based_table_factory.cc index 924d4b259..cc7caae11 100644 --- a/table/block_based/block_based_table_factory.cc +++ b/table/block_based/block_based_table_factory.cc @@ -387,7 +387,7 @@ static std::unordered_map {offsetof(struct BlockBasedTableOptions, block_cache), OptionType::kUnknown, OptionVerificationType::kNormal, (OptionTypeFlags::kCompareNever | OptionTypeFlags::kDontSerialize), - // Parses the input vsalue as a Cache + // Parses the input value as a Cache [](const ConfigOptions& opts, const std::string&, const std::string& value, void* addr) { auto* cache = static_cast*>(addr); @@ -397,7 +397,7 @@ static std::unordered_map {offsetof(struct BlockBasedTableOptions, block_cache_compressed), OptionType::kUnknown, OptionVerificationType::kNormal, (OptionTypeFlags::kCompareNever | OptionTypeFlags::kDontSerialize), - // Parses the input vsalue as a Cache + // Parses the input value as a Cache [](const ConfigOptions& opts, const std::string&, const std::string& value, void* addr) { auto* cache = static_cast*>(addr); diff --git a/table/block_fetcher.cc b/table/block_fetcher.cc index dc32c887c..e303b8363 100644 --- a/table/block_fetcher.cc +++ b/table/block_fetcher.cc @@ -126,7 +126,7 @@ inline void BlockFetcher::PrepareBufferForBlockFromFile() { // cache miss read from device if ((do_uncompress_ || ioptions_.allow_mmap_reads) && block_size_with_trailer_ < kDefaultStackBufferSize) { - // If we've got a small enough hunk of data, read it in to the + // If we've got a small enough chunk of data, read it in to the // trivially allocated stack buffer instead of needing a full malloc() // // `GetBlockContents()` cannot return this data as its lifetime is tied to diff --git a/table/table_test.cc b/table/table_test.cc index f8f5bda49..7e60a06b0 100644 --- a/table/table_test.cc +++ b/table/table_test.cc @@ -1246,7 +1246,7 @@ class FileChecksumTestHelper { } ~FileChecksumTestHelper() {} - void CreateWriteableFile() { + void CreateWritableFile() { sink_ = new test::StringSink(); std::unique_ptr holder(sink_); file_writer_.reset(new WritableFileWriter( @@ -3739,7 +3739,7 @@ TEST_P(BlockBasedTableTest, NoFileChecksum) { std::string column_family_name; FileChecksumTestHelper f(true); - f.CreateWriteableFile(); + f.CreateWritableFile(); std::unique_ptr builder; builder.reset(ioptions.table_factory->NewTableBuilder( TableBuilderOptions(ioptions, moptions, *comparator, @@ -3774,7 +3774,7 @@ TEST_P(BlockBasedTableTest, Crc32cFileChecksum) { options.file_checksum_gen_factory->CreateFileChecksumGenerator( gen_context); FileChecksumTestHelper f(true); - f.CreateWriteableFile(); + f.CreateWritableFile(); f.SetFileChecksumGenerator(checksum_crc32c_gen1.release()); std::unique_ptr builder; builder.reset(ioptions.table_factory->NewTableBuilder( @@ -3876,7 +3876,7 @@ TEST_F(PlainTableTest, NoFileChecksum) { std::string column_family_name; int unknown_level = -1; FileChecksumTestHelper f(true); - f.CreateWriteableFile(); + f.CreateWritableFile(); std::unique_ptr builder(factory.NewTableBuilder( TableBuilderOptions(ioptions, moptions, ikc, @@ -3915,7 +3915,7 @@ TEST_F(PlainTableTest, Crc32cFileChecksum) { options.file_checksum_gen_factory->CreateFileChecksumGenerator( gen_context); FileChecksumTestHelper f(true); - f.CreateWriteableFile(); + f.CreateWritableFile(); f.SetFileChecksumGenerator(checksum_crc32c_gen1.release()); std::unique_ptr builder(factory.NewTableBuilder( diff --git a/util/mutexlock.h b/util/mutexlock.h index 379a0eaad..8af29dd78 100644 --- a/util/mutexlock.h +++ b/util/mutexlock.h @@ -43,7 +43,7 @@ class MutexLock { // // Acquire a ReadLock on the specified RWMutex. -// The Lock will be automatically released then the +// The Lock will be automatically released when the // object goes out of scope. // class ReadLock {