-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add enable_remote_compaction option to DB Stress (#13378)
Summary: First step to add (simulated) Remote Compaction in Stress Test. More PRs to come. Just first PR to add the FLAG to enable it. `DbStressCompactionService` will return `kUseLocal` for all compactions. Pull Request resolved: #13378 Test Plan: ``` python3 -u tools/db_crashtest.py whitebox --enable_remote_compaction=1 ``` ``` python3 -u tools/db_crashtest.py blackbox --enable_remote_compaction=1 ``` Reviewed By: hx235 Differential Revision: D69269568 Pulled By: jaykorean fbshipit-source-id: 5119bb6afd4d52f66923fb095150d3132226f7ba
- Loading branch information
1 parent
62531da
commit 302254d
Showing
5 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. | ||
// This source code is licensed under both the GPLv2 (found in the | ||
// COPYING file in the root directory) and Apache 2.0 License | ||
// (found in the LICENSE.Apache file in the root directory). | ||
|
||
#pragma once | ||
|
||
#include "rocksdb/options.h" | ||
|
||
namespace ROCKSDB_NAMESPACE { | ||
|
||
// Service to simulate Remote Compaction in Stress Test | ||
class DbStressCompactionService : public CompactionService { | ||
public: | ||
explicit DbStressCompactionService() {} | ||
|
||
static const char* kClassName() { return "DbStressCompactionService"; } | ||
|
||
const char* Name() const override { return kClassName(); } | ||
|
||
CompactionServiceScheduleResponse Schedule( | ||
const CompactionServiceJobInfo& /*info*/, | ||
const std::string& /*compaction_service_input*/) override { | ||
CompactionServiceScheduleResponse response( | ||
"Implement Me", CompactionServiceJobStatus::kUseLocal); | ||
return response; | ||
} | ||
|
||
CompactionServiceJobStatus Wait(const std::string& /*scheduled_job_id*/, | ||
std::string* /*result*/) override { | ||
// TODO - Implement | ||
return CompactionServiceJobStatus::kUseLocal; | ||
} | ||
|
||
// TODO - Implement | ||
void CancelAwaitingJobs() override {} | ||
}; | ||
|
||
} // namespace ROCKSDB_NAMESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters