-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Remote Compaction - Remove CFOptions in CompactionServiceOptionsOverride #12981
Conversation
@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
include/rocksdb/options.h
Outdated
@@ -2289,13 +2289,17 @@ struct CompactionServiceOptionsOverride { | |||
Env* env = Env::Default(); | |||
std::shared_ptr<FileChecksumGenFactory> file_checksum_gen_factory = nullptr; | |||
|
|||
// DEPRECATED - CFOption pointer configurations will be passed as static name | |||
// These will need to be registered in the remote worker's ObjectRegistry, | |||
// then created by Type::CreateFromString() when needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since remove compaction APIs are experiment, would it be safe to just remove these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an old prototype code in fbcode still referencing this, so that's why I didn't remove them at first, but I guess can clean up the old prototype now before we merge this PR into fbcode.
@jaykorean has updated the pull request. You must reimport the pull request before landing. |
@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Plan changed |
…stead of by CompactionServiceOptionsOverride
…r and only support CompactionFilterFactory in Remote Compaction
54f8d04
to
b10feb2
Compare
@jaykorean has updated the pull request. You must reimport the pull request before landing. |
@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary
In the initial version of the remote compaction,
CompactionServiceOptionsOverride
was introduced temporarily as a workaround to set the pointer configurations explicitly because passing them to the remote worker was not available at that time.In the Meta's internal Offload infra, we are now able to register these objects set in the CFOptions including CompactionFilterFactory, MergeOperator and others. These pointer configs are passed to the remote worker as
CustomSharedPtr
,CustomUniquePtr
, orCustomRawPtr
Option types, which can be created byType::createFromString()
on the remote side as long as they are registered in the ObjectRegistry. (As defined inrocksdb/options/cf_options.cc
Lines 259 to 833 in 92ad4a8
In this PR, we are also not allowing remote compactions with
options.compaction_filter
set.options.compaction_filter
is serialized asCustomRawPtr
andCustomRawPtr
objects are loaded as static objects. This can become a problem if the remote worker processes compactions from multiple different primary hosts with the same compaction filter with different options. To workaround this, we are only allowingCompactionFilterFactory
. For compactions withoptions.compaction_filter
set, they will fall back to local compaction for now.Test Plan
Updated
compaction_service_test::CompactionFilter
test and added Updatedcompaction_service_test::CompactionFilterFactory
Also tested with Meta's internal Offload infra