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

filer: support uploading file without needEnsureParentDir #2761

Merged
merged 5 commits into from
Mar 17, 2022
Merged

filer: support uploading file without needEnsureParentDir #2761

merged 5 commits into from
Mar 17, 2022

Conversation

famosss
Copy link
Contributor

@famosss famosss commented Mar 17, 2022

Mostly,the parent dir has already exists or i can make the parent dir manually in advance.
Use the parameter,i can reduce one metadata request on per upload request.

@chrislusf
Copy link
Collaborator

This needEnsureParentDir is default to true, which is current behavior.

I am confused. Do you want to ensure parent directory or not? If so, it is already current behavior.

@famosss
Copy link
Contributor Author

famosss commented Mar 17, 2022

This needEnsureParentDir is default to true, which is current behavior.

I am confused. Do you want to ensure parent directory or not? If so, it is already current behavior.

By default,i want to ensure parent dir exists,It makes weedfs particularly easy to use.
But,I use curl -F file=@report.js "http://localhost:8888/javascript/some_file?ensureParentDir=false in my product environment to reduce the number of metadata requests.

In my case,I use BaikalDB to store the metadata, about 7ms to upload a file,but 3ms used to request the metadata service.The parameter can improve performance by about 14%(7ms -> 6ms)

@chrislusf
Copy link
Collaborator

chrislusf commented Mar 17, 2022

Please do these:

@chrislusf chrislusf merged commit d2acde2 into seaweedfs:master Mar 17, 2022
@famosss
Copy link
Contributor Author

famosss commented Mar 17, 2022

Please do these:

done

chrislusf added a commit that referenced this pull request Mar 17, 2022
related to #2761

It's better to default to false.
@chrislusf
Copy link
Collaborator

I changed the code and doc to use skipCheckParentDir, which defaults to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants