Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for BlobDB to ldb #9630

Closed
wants to merge 9 commits into from
Closed
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
## Unreleased
### New Features
* Allow WriteBatchWithIndex to index a WriteBatch that includes keys with user-defined timestamps. The index itself does not have timestamp.
* Added BlobDB options to `ldb`

### Bug Fixes
* * Fixed a data race on `versions_` between `DBImpl::ResumeImpl()` and threads waiting for recovery to complete (#9496)
Expand Down
21 changes: 21 additions & 0 deletions include/rocksdb/utilities/ldb_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ class LDBCommand {
static const std::string ARG_CREATE_IF_MISSING;
static const std::string ARG_NO_VALUE;
static const std::string ARG_DISABLE_CONSISTENCY_CHECKS;
static const std::string ARG_ENABLE_BLOB_FILES;
static const std::string ARG_MIN_BLOB_SIZE;
static const std::string ARG_BLOB_FILE_SIZE;
static const std::string ARG_BLOB_COMPRESSION_TYPE;
changneng marked this conversation as resolved.
Show resolved Hide resolved
static const std::string ARG_ENABLE_BLOB_GARBAGE_COLLECTION;
static const std::string ARG_BLOB_GARBAGE_COLLECTION_AGE_CUTOFF;
static const std::string ARG_BLOB_GARBAGE_COLLECTION_FORCE_THRESHOLD;
static const std::string ARG_BLOB_COMPACTION_READAHEAD_SIZE;

struct ParsedParams {
std::string cmd;
Expand Down Expand Up @@ -173,6 +181,10 @@ class LDBCommand {
// The value passed to options.force_consistency_checks.
bool force_consistency_checks_;

bool enable_blob_files_;

bool enable_blob_garbage_collection_;

bool create_if_missing_;

/**
Expand Down Expand Up @@ -233,9 +245,18 @@ class LDBCommand {
const std::string& option, int& value,
LDBCommandExecuteResult& exec_state);

bool ParseDoubleOption(const std::map<std::string, std::string>& options,
const std::string& option, double& value,
LDBCommandExecuteResult& exec_state);

bool ParseStringOption(const std::map<std::string, std::string>& options,
const std::string& option, std::string* value);

bool ParseCompressionTypeOption(
const std::map<std::string, std::string>& options,
const std::string& option, CompressionType& value,
LDBCommandExecuteResult& exec_state);

/**
* Returns the value of the specified option as a boolean.
* default_val is used if the option is not found in options.
Expand Down
Loading