From 66747ee9c9aac1a0eeb752811bdf33f98ee65363 Mon Sep 17 00:00:00 2001 From: tianzhang Date: Thu, 19 May 2022 23:17:17 +0800 Subject: [PATCH] hotfix_fsync fix fsync --- weed/server/filer_server_handlers_write.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index 3bbae8197..b0e0c5af0 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/weed/server/filer_server_handlers_write.go @@ -230,7 +230,11 @@ func (fs *FilerServer) detectStorageOption0(requestURI, qCollection, qReplicatio so, err := fs.detectStorageOption(requestURI, qCollection, qReplication, int32(ttl.Minutes())*60, diskType, dataCenter, rack, dataNode) if so != nil { - so.Fsync = fsync == "true" + if fsync == "false" { + so.Fsync = false + } else if fsync == "true" { + so.Fsync = true + } } return so, err