mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-28 15:33:54 +00:00
4720ba4391
Summary: We haven't been actively mantaining RocksDB LITE recently and the size must have been gone up significantly. We are removing the support. Most of changes were done through following comments: unifdef -m -UROCKSDB_LITE `git grep -l ROCKSDB_LITE | egrep '[.](cc|h)'` by Peter Dillinger. Others changes were manually applied to build scripts, CircleCI manifests, ROCKSDB_LITE is used in an expression and file db_stress_test_base.cc. Pull Request resolved: https://github.com/facebook/rocksdb/pull/11147 Test Plan: See CI Reviewed By: pdillinger Differential Revision: D42796341 fbshipit-source-id: 4920e15fc2060c2cd2221330a6d0e5e65d4b7fe2
65 lines
2.3 KiB
C++
65 lines
2.3 KiB
C++
// Copyright (c) 2017-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 <string>
|
|
|
|
#include "file/filename.h"
|
|
#include "rocksdb/db.h"
|
|
#include "rocksdb/utilities/checkpoint.h"
|
|
|
|
namespace ROCKSDB_NAMESPACE {
|
|
|
|
class CheckpointImpl : public Checkpoint {
|
|
public:
|
|
explicit CheckpointImpl(DB* db) : db_(db) {}
|
|
|
|
Status CreateCheckpoint(const std::string& checkpoint_dir,
|
|
uint64_t log_size_for_flush,
|
|
uint64_t* sequence_number_ptr) override;
|
|
|
|
Status ExportColumnFamily(ColumnFamilyHandle* handle,
|
|
const std::string& export_dir,
|
|
ExportImportFilesMetaData** metadata) override;
|
|
|
|
// Checkpoint logic can be customized by providing callbacks for link, copy,
|
|
// or create.
|
|
Status CreateCustomCheckpoint(
|
|
std::function<Status(const std::string& src_dirname,
|
|
const std::string& fname, FileType type)>
|
|
link_file_cb,
|
|
std::function<Status(const std::string& src_dirname,
|
|
const std::string& fname, uint64_t size_limit_bytes,
|
|
FileType type, const std::string& checksum_func_name,
|
|
const std::string& checksum_val,
|
|
const Temperature src_temperature)>
|
|
copy_file_cb,
|
|
std::function<Status(const std::string& fname,
|
|
const std::string& contents, FileType type)>
|
|
create_file_cb,
|
|
uint64_t* sequence_number, uint64_t log_size_for_flush,
|
|
bool get_live_table_checksum = false);
|
|
|
|
private:
|
|
void CleanStagingDirectory(const std::string& path, Logger* info_log);
|
|
|
|
// Export logic customization by providing callbacks for link or copy.
|
|
Status ExportFilesInMetaData(
|
|
const DBOptions& db_options, const ColumnFamilyMetaData& metadata,
|
|
std::function<Status(const std::string& src_dirname,
|
|
const std::string& fname)>
|
|
link_file_cb,
|
|
std::function<Status(const std::string& src_dirname,
|
|
const std::string& fname)>
|
|
copy_file_cb);
|
|
|
|
private:
|
|
DB* db_;
|
|
};
|
|
|
|
} // namespace ROCKSDB_NAMESPACE
|
|
|