Skip to content

Commit

Permalink
Delete Remote Compaction Code (#280)
Browse files Browse the repository at this point in the history
Summary:
There is now an upstream implementation of remote compaction, so we
don't need our own anymore:
https://github.com/facebook/rocksdb/wiki/Remote-Compaction-(Experimental)

Test Plan:
Buildkite

Reviewers:
  • Loading branch information
igorcanadi authored Aug 22, 2023
1 parent 5d7fbb7 commit 112d771
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 1,241 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1886,9 +1886,6 @@ ldb_cmd_test: $(OBJ_DIR)/tools/ldb_cmd_test.o $(TOOLS_LIBRARY) $(TEST_LIBRARY) $
ldb: $(OBJ_DIR)/tools/ldb.o $(TOOLS_LIBRARY) $(LIBRARY)
$(AM_LINK)

remote_compaction_test: cloud/remote_compaction_test.o $(TEST_LIBRARY) $(LIBRARY)
$(AM_LINK)

db_cloud_test: cloud/db_cloud_test.o $(TEST_LIBRARY) $(LIBRARY)
$(AM_LINK)

Expand Down
22 changes: 0 additions & 22 deletions cloud/db_cloud_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -448,28 +448,6 @@ Status DBCloudImpl::DoCheckpointToCloud(
return st;
}

Status DBCloudImpl::ExecuteRemoteCompactionRequest(
const PluggableCompactionParam& inputParams,
PluggableCompactionResult* result, bool doSanitize) {
auto* cfs =
dynamic_cast<CloudFileSystemImpl*>(GetEnv()->GetFileSystem().get());
assert(cfs);

// run the compaction request on the underlying local database
Status status = GetBaseDB()->ExecuteRemoteCompactionRequest(
inputParams, result, doSanitize);
if (!status.ok()) {
return status;
}

// convert the local pathnames to the cloud pathnames
for (unsigned int i = 0; i < result->output_files.size(); i++) {
OutputFile* outfile = &result->output_files[i];
outfile->pathname = cfs->RemapFilename(outfile->pathname);
}
return Status::OK();
}

Status DBCloud::ListColumnFamilies(const DBOptions& db_options,
const std::string& name,
std::vector<std::string>* column_families) {
Expand Down
4 changes: 0 additions & 4 deletions cloud/db_cloud_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ class DBCloudImpl : public DBCloud {
Status CheckpointToCloud(const BucketOptions& destination,
const CheckpointToCloudOptions& options) override;

Status ExecuteRemoteCompactionRequest(
const PluggableCompactionParam& inputParams,
PluggableCompactionResult* result, bool sanitize) override;

protected:
// The CloudFileSystem used by this open instance.
CloudFileSystem* cfs_;
Expand Down
Loading

0 comments on commit 112d771

Please sign in to comment.