mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-18 19:19:24 +08:00
Merge pull request #1298 from song-zhang/master
add fsync option for benchmark
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user