diff options
| author | zhangsong <zhangsong@cloudwalk.cn> | 2020-04-30 23:31:08 +0800 |
|---|---|---|
| committer | zhangsong <zhangsong@cloudwalk.cn> | 2020-04-30 23:31:08 +0800 |
| commit | d819865fe7036ec64a28d896aca61ba8b3a39d02 (patch) | |
| tree | 1ef053596934a7b8a59a772d542c8c90c7d63cba /weed/operation/submit.go | |
| parent | ea809a45abcd4b862cd879f6eadc6d34e73e2c40 (diff) | |
| download | seaweedfs-d819865fe7036ec64a28d896aca61ba8b3a39d02.tar.xz seaweedfs-d819865fe7036ec64a28d896aca61ba8b3a39d02.zip | |
add fsync option for benchmark
Diffstat (limited to 'weed/operation/submit.go')
| -rw-r--r-- | weed/operation/submit.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/operation/submit.go b/weed/operation/submit.go index d1c4706ce..7cf5b9645 100644 --- a/weed/operation/submit.go +++ b/weed/operation/submit.go @@ -27,6 +27,7 @@ type FilePart struct { Ttl string Server string //this comes from assign result Fid string //this comes from assign result, but customizable + Fsync bool } type SubmitResult struct { @@ -116,6 +117,9 @@ func (fi FilePart) Upload(maxMB int, master string, usePublicUrl bool, jwt secur if fi.ModTime != 0 { fileUrl += "?ts=" + strconv.Itoa(int(fi.ModTime)) } + if fi.Fsync { + fileUrl += "?fsync=true" + } if closer, ok := fi.Reader.(io.Closer); ok { defer closer.Close() } |
