Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(object store): introduce object prefix for opendal object store #16542
feat(object store): introduce object prefix for opendal object store #16542
Changes from 12 commits
93ea4c4
c9da117
7ad7a1a
5798276
800cc64
912f913
7acef06
b71f9b2
3685478
a7dcb71
dcdea1b
c332de6
c63dc09
260fac6
1f837c6
ac1b97d
7c5e8c3
1f2dfe3
eb628fc
0420144
58581cf
87ab951
a028c13
ea9befe
6de4852
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I suggest we move the logic to
MetaSrvEnv::new
instead here becuase:cluster_first_launch
can be obtained directly there without interacting with object store and modifyingwrite_exclusive_cluster_id
use_new_object_prefix_strategy
mutable and instead pass the init value foruse_new_object_prefix_strategy
to init system params manager.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.
For
KV
meta store, it is, but forSQL
meta store, can we know whether it is the first launch here?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.
cc @yezizp2012 Can we also judge cluster_first_launch for SQL backend, just like KV backend?
Otherwise we need to modify this system variable later, but "Making the use_new_object_prefix_strategy mutable will be dangerous because user can techinically change it via ALTER in SQL and the after a restart, the whole cluster will crash."
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.
After some offline discussion, for SQL backend I use
MigratorTrait::get_applied_migrations()
to check whether it's a new cluster:m20230908_072257_init
is applied, it's an old clusterm20230908_072257_init
is not applied, it's a new cluster.Then we can make
use_new_object_prefix_strategy
immutable.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.
Have we verified that
Fs
andHdfs
worked after this change? I am not sure they will auto create the prefix dir for us.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.
I have verified that
fs
backend work.