-
Notifications
You must be signed in to change notification settings - Fork 526
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] curvefs/client: warmup list and stop #2652
[feat] curvefs/client: warmup list and stop #2652
Conversation
5bdf0c8
to
4afb55a
Compare
4afb55a
to
2201c4c
Compare
cicheck |
2201c4c
to
d058e72
Compare
cicheck |
@Cyber-SiKu Could you help review my PR? Thanks |
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.
Is this a pre-pr? Doesn't seem to be finished?
d7edd91
to
34a9d19
Compare
This is actually a completed pull request. |
cicheck |
cicheck |
Haven't seen the implementation of list and stop? |
@ken90242 You don't seem to have pushed your changes?https://github.com/opencurve/curve/compare/d7edd91267eb89d5a1ed4c546a5c7c048e8cd668..34a9d19d707458953d5775db5cb6d193dbd3a308 |
@Cyber-SiKu Here you are: https://github.com/opencurve/curve/compare/d058e725dcd57bdd67835baf42bf5c126a9b6861..34a9d19d707458953d5775db5cb6d193dbd3a308 |
This is what I have gathered from the original issue - there don't seem to be any requirements concerning the list and stop functionalities. Is there anything I might be overlooking? |
c6b2605
to
d4dd8de
Compare
Could you check out my latest commit? p.s. I haven't finalized it yet. |
3023e6a
to
c12fbac
Compare
Thanks for working on this! |
I have finished my updates; you can find the corresponding commits below: |
cicheck |
e1db6ff
to
d182c77
Compare
cicheck |
1 similar comment
cicheck |
@Cyber-SiKu the test is passed |
4dc928f
to
2a69423
Compare
cicheck |
2 similar comments
cicheck |
cicheck |
cicheck |
3 similar comments
cicheck |
cicheck |
cicheck |
2a69423
to
163aec7
Compare
pls fix dco |
cicheck
which doc are you referring to? |
Signed-off-by: ken90242 <[email protected]>
163aec7
to
f5217d3
Compare
cicheck |
cicheck |
@Cyber-SiKu anyone you would suggest to be another reviewer of this PR? |
What problem does this PR solve?
#2244
1. warmup add file list: not overwriting the providing file list file
The original design for the "add warmup file list" will modify the contents of the provided file by replacing the mount point with the root path in every path mentioned in the file.
For example, if you execute the command
curve fs warmup add --filelist /warmup/0809.list
, with the mount point being/mnt
, and the root path in the file system being/x
, and the content of the file/warmup/0809.list
being:After running the command,
/warmup/0809.list
will be updated toAfterward, the handling process can access the file content directly and utilize the modified paths to locate the corresponding dentries.
However, This change is non-reversible, and it can be unexpected for clients who may not anticipate such modifications. It would be better to achieve the same goal without altering the provided file content.
2. warmup stop
A functionality that allows users to cancel a warmup job and its derivatives.
3. warmup list
A functionality that allows users to list out all the running warmup jobs under the specified curvefs.
What is changed, and how does it work?
1. warmup add file list: not overwriting the providing file list file
The CLI command tool no longer modifies the file directly. It passes the mount point and root to the fuse-client, and path replacement is handled on-the-fly by the "ScanWarmupFilelist" procedure.
2. warmup stop
According to the activity diagram below, the data structure requires cleanup with a specific dependency sequence:
My implementation is erasing the inode entry key in the sequence of
inode2Progress_, warmupFilelistDeque_ (if file list), inode2FetchDentryPool_, warmupInodeDeque_, inode2FetchS3ObjectsPool
3. warmup list
I iterate through all warmup jobs in inode2Progress_ and use the path stored inside the inode2Progress_ to form a map (i.e.,
{ path: progress }
) solely serving the CLI output purposes.Side effects(Breaking backward compatibility? Performance regression?):
This PR might break backward compatibility since now the user has to upgrade both their curve toolset and curvefs client at the same time.None
Demo
curve fs warmup list <curvefs mount path>
&curve fs warmup cancel <file>
curve fs warmup list <curvefs mount path>
&curve fs warmup cancel --filelist <filelist>
curve fs warmup add --filelist <filelist>
(not change the file list content)curve fs warmup query <file>
(query still works)Check List