fixed typo
Summary: I fixed exisit -> exist Closes https://github.com/facebook/rocksdb/pull/1799 Differential Revision: D4451466 Pulled By: yiwu-arbug fbshipit-source-id: b447c3a
This commit is contained in:
parent
973f1b78fd
commit
f2b4939da4
@ -613,7 +613,7 @@ TEST_F(DBSSTTest, OpenDBWithInfiniteMaxOpenFiles) {
|
|||||||
}
|
}
|
||||||
Close();
|
Close();
|
||||||
|
|
||||||
// Reopening the DB will load all exisitng files
|
// Reopening the DB will load all existing files
|
||||||
Reopen(options);
|
Reopen(options);
|
||||||
ASSERT_EQ("12,0,12", FilesPerLevel(0));
|
ASSERT_EQ("12,0,12", FilesPerLevel(0));
|
||||||
std::vector<std::vector<FileMetaData>> files;
|
std::vector<std::vector<FileMetaData>> files;
|
||||||
|
@ -258,11 +258,11 @@ TEST_F(ExternalSSTFileTest, Basic) {
|
|||||||
ASSERT_EQ(Get(Key(k)), Key(k) + "_val");
|
ASSERT_EQ(Get(Key(k)), Key(k) + "_val");
|
||||||
}
|
}
|
||||||
|
|
||||||
// This file has overlapping values with the exisitng data
|
// This file has overlapping values with the existing data
|
||||||
s = DeprecatedAddFile({file3});
|
s = DeprecatedAddFile({file3});
|
||||||
ASSERT_FALSE(s.ok()) << s.ToString();
|
ASSERT_FALSE(s.ok()) << s.ToString();
|
||||||
|
|
||||||
// This file has overlapping values with the exisitng data
|
// This file has overlapping values with the existing data
|
||||||
s = DeprecatedAddFile({file4});
|
s = DeprecatedAddFile({file4});
|
||||||
ASSERT_FALSE(s.ok()) << s.ToString();
|
ASSERT_FALSE(s.ok()) << s.ToString();
|
||||||
|
|
||||||
@ -510,7 +510,7 @@ TEST_F(ExternalSSTFileTest, AddList) {
|
|||||||
ASSERT_EQ(user_props["xyz_Count"], "100");
|
ASSERT_EQ(user_props["xyz_Count"], "100");
|
||||||
}
|
}
|
||||||
|
|
||||||
// This file list has overlapping values with the exisitng data
|
// This file list has overlapping values with the existing data
|
||||||
s = DeprecatedAddFile(file_list3);
|
s = DeprecatedAddFile(file_list3);
|
||||||
ASSERT_FALSE(s.ok()) << s.ToString();
|
ASSERT_FALSE(s.ok()) << s.ToString();
|
||||||
|
|
||||||
@ -705,7 +705,7 @@ TEST_F(ExternalSSTFileTest, NoCopy) {
|
|||||||
ASSERT_TRUE(s.ok()) << s.ToString();
|
ASSERT_TRUE(s.ok()) << s.ToString();
|
||||||
ASSERT_OK(env_->FileExists(file2));
|
ASSERT_OK(env_->FileExists(file2));
|
||||||
|
|
||||||
// This file have overlapping values with the exisitng data
|
// This file have overlapping values with the existing data
|
||||||
s = DeprecatedAddFile({file2}, true /* move file */);
|
s = DeprecatedAddFile({file2}, true /* move file */);
|
||||||
ASSERT_FALSE(s.ok()) << s.ToString();
|
ASSERT_FALSE(s.ok()) << s.ToString();
|
||||||
ASSERT_OK(env_->FileExists(file3));
|
ASSERT_OK(env_->FileExists(file3));
|
||||||
|
@ -1508,7 +1508,7 @@ struct ReadOptions {
|
|||||||
// used in the table. Some table format (e.g. plain table) may not support
|
// used in the table. Some table format (e.g. plain table) may not support
|
||||||
// this option.
|
// this option.
|
||||||
// If true when calling Get(), we also skip prefix bloom when reading from
|
// If true when calling Get(), we also skip prefix bloom when reading from
|
||||||
// block based table. It provides a way to read exisiting data after
|
// block based table. It provides a way to read existing data after
|
||||||
// changing implementation of prefix extractor.
|
// changing implementation of prefix extractor.
|
||||||
bool total_order_seek;
|
bool total_order_seek;
|
||||||
|
|
||||||
|
@ -68,13 +68,13 @@ class SstFileManager {
|
|||||||
// this value is set to 1024 (1 Kb / sec) and we deleted a file of size 4 Kb
|
// this value is set to 1024 (1 Kb / sec) and we deleted a file of size 4 Kb
|
||||||
// in 1 second, we will wait for another 3 seconds before we delete other
|
// in 1 second, we will wait for another 3 seconds before we delete other
|
||||||
// files, Set to 0 to disable deletion rate limiting.
|
// files, Set to 0 to disable deletion rate limiting.
|
||||||
// @param delete_exisitng_trash: If set to true, the newly created
|
// @param delete_existing_trash: If set to true, the newly created
|
||||||
// SstFileManager will delete files that already exist in trash_dir.
|
// SstFileManager will delete files that already exist in trash_dir.
|
||||||
// @param status: If not nullptr, status will contain any errors that happened
|
// @param status: If not nullptr, status will contain any errors that happened
|
||||||
// during creating the missing trash_dir or deleting existing files in trash.
|
// during creating the missing trash_dir or deleting existing files in trash.
|
||||||
extern SstFileManager* NewSstFileManager(
|
extern SstFileManager* NewSstFileManager(
|
||||||
Env* env, std::shared_ptr<Logger> info_log = nullptr,
|
Env* env, std::shared_ptr<Logger> info_log = nullptr,
|
||||||
std::string trash_dir = "", int64_t rate_bytes_per_sec = 0,
|
std::string trash_dir = "", int64_t rate_bytes_per_sec = 0,
|
||||||
bool delete_exisitng_trash = true, Status* status = nullptr);
|
bool delete_existing_trash = true, Status* status = nullptr);
|
||||||
|
|
||||||
} // namespace rocksdb
|
} // namespace rocksdb
|
||||||
|
@ -122,14 +122,14 @@ void SstFileManagerImpl::OnDeleteFileImpl(const std::string& file_path) {
|
|||||||
SstFileManager* NewSstFileManager(Env* env, std::shared_ptr<Logger> info_log,
|
SstFileManager* NewSstFileManager(Env* env, std::shared_ptr<Logger> info_log,
|
||||||
std::string trash_dir,
|
std::string trash_dir,
|
||||||
int64_t rate_bytes_per_sec,
|
int64_t rate_bytes_per_sec,
|
||||||
bool delete_exisitng_trash, Status* status) {
|
bool delete_existing_trash, Status* status) {
|
||||||
SstFileManagerImpl* res =
|
SstFileManagerImpl* res =
|
||||||
new SstFileManagerImpl(env, info_log, trash_dir, rate_bytes_per_sec);
|
new SstFileManagerImpl(env, info_log, trash_dir, rate_bytes_per_sec);
|
||||||
|
|
||||||
Status s;
|
Status s;
|
||||||
if (trash_dir != "" && rate_bytes_per_sec > 0) {
|
if (trash_dir != "" && rate_bytes_per_sec > 0) {
|
||||||
s = env->CreateDirIfMissing(trash_dir);
|
s = env->CreateDirIfMissing(trash_dir);
|
||||||
if (s.ok() && delete_exisitng_trash) {
|
if (s.ok() && delete_existing_trash) {
|
||||||
std::vector<std::string> files_in_trash;
|
std::vector<std::string> files_in_trash;
|
||||||
s = env->GetChildren(trash_dir, &files_in_trash);
|
s = env->GetChildren(trash_dir, &files_in_trash);
|
||||||
if (s.ok()) {
|
if (s.ok()) {
|
||||||
@ -161,7 +161,7 @@ SstFileManager* NewSstFileManager(Env* env, std::shared_ptr<Logger> info_log,
|
|||||||
SstFileManager* NewSstFileManager(Env* env, std::shared_ptr<Logger> info_log,
|
SstFileManager* NewSstFileManager(Env* env, std::shared_ptr<Logger> info_log,
|
||||||
std::string trash_dir,
|
std::string trash_dir,
|
||||||
int64_t rate_bytes_per_sec,
|
int64_t rate_bytes_per_sec,
|
||||||
bool delete_exisitng_trash, Status* status) {
|
bool delete_existing_trash, Status* status) {
|
||||||
if (status) {
|
if (status) {
|
||||||
*status =
|
*status =
|
||||||
Status::NotSupported("SstFileManager is not supported in ROCKSDB_LITE");
|
Status::NotSupported("SstFileManager is not supported in ROCKSDB_LITE");
|
||||||
|
@ -45,7 +45,7 @@ Status BlockCacheTier::Open() {
|
|||||||
// Create base/<cache dir> directory
|
// Create base/<cache dir> directory
|
||||||
status = opt_.env->CreateDir(GetCachePath());
|
status = opt_.env->CreateDir(GetCachePath());
|
||||||
if (!status.ok()) {
|
if (!status.ok()) {
|
||||||
// directory already exisits, clean it up
|
// directory already exists, clean it up
|
||||||
status = CleanupCacheFolder(GetCachePath());
|
status = CleanupCacheFolder(GetCachePath());
|
||||||
assert(status.ok());
|
assert(status.ok());
|
||||||
if (!status.ok()) {
|
if (!status.ok()) {
|
||||||
@ -226,7 +226,7 @@ Status BlockCacheTier::InsertImpl(const Slice& key, const Slice& data) {
|
|||||||
|
|
||||||
LBA lba;
|
LBA lba;
|
||||||
if (metadata_.Lookup(key, &lba)) {
|
if (metadata_.Lookup(key, &lba)) {
|
||||||
// the key already exisits, this is duplicate insert
|
// the key already exists, this is duplicate insert
|
||||||
return Status::OK();
|
return Status::OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user