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

Make WalFilter, SstPartitionerFactory, FileChecksumGenFactory, and TableProperties Customizable #8638

Closed
wants to merge 23 commits into from

Conversation

mrambacher
Copy link
Contributor

No description provided.

- Fix issue with OptionType::Vector when the nested item is a Customizable with no names
- Fix issue with OptionType::Vector to appropriately wrap the elements in a Vector;
- Fix an issue with nested Customizable object with a null immutable object still appearing in the mutable options;
- Fix/Add tests for null/empty customizable objects
- Move the RegisterTestObjects from customizable_test into testutil.
WalFilter, TablePropertiesCollectorFactory, SstPartitionerFactory, FileChecksumGenFactory are all now customizable and can be saved and restored from the Options file.
@@ -68,6 +68,9 @@ static Status NewSharedObject(
if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
return Status::OK();
}
} else if (opt_map.empty()) {
Copy link
Contributor

@zhichao-cao zhichao-cao Aug 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the logic change to the comment. Previously, if id is empty, we will return not supported. But now, we will reset the result to nullptr. Also, can you explain a little bit why we need this change? Just move the logic from LoadSharedObject here?

#include "rocksdb/utilities/customizable_util.h"

namespace ROCKSDB_NAMESPACE {
Status WalFilter::CreateFromString(const ConfigOptions& config_options,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is just the CreateFromString, can we move it to wal_filter.h? Declaration+definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is just the CreateFromString, can we move it to wal_filter.h? Declaration+definition.

It should really be here. If there is a default or "shipped" implementation later, it should be registered here.

@@ -601,5 +602,41 @@ Status CreateEnvFromSystem(const ConfigOptions& config_options, Env** result,
}
}

#ifndef ROCKSDB_LITE
// This method loads existing test classes into the ObjectRegistry
int RegisterTestObjects(ObjectLibrary& library, const std::string& /*arg*/) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to be used outside customizable_test.cc?

@facebook-github-bot
Copy link
Contributor

@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@@ -133,4 +134,16 @@ Status GetFileChecksumsFromManifest(Env* src_env, const std::string& abs_path,
return retriever.status();
}

Status FileChecksumGenFactory::CreateFromString(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we add the RegisterFileChecksumFactories here?

@facebook-github-bot
Copy link
Contributor

@mrambacher has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mrambacher has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@mrambacher has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@mrambacher has updated the pull request. You must reimport the pull request before landing.

Copy link
Contributor

@zhichao-cao zhichao-cao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, also update the history.md. Thanks for addressing the review comments.

@facebook-github-bot
Copy link
Contributor

@mrambacher has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

yoori pushed a commit to yoori/rocksdb that referenced this pull request Nov 26, 2023
…bleProperties Customizable (#8638)

Summary: Pull Request resolved: facebook/rocksdb#8638

Reviewed By: zhichao-cao

Differential Revision: D31024729

Pulled By: mrambacher

fbshipit-source-id: 954c04ccab0b8dee64050a27aadf78ed119106c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants