Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
delete os.O_SYNC flag when supernode write piece to local
Browse files Browse the repository at this point in the history
Signed-off-by: zhouchencheng <[email protected]>
  • Loading branch information
zcc35357949 committed Sep 5, 2019
1 parent 8c236c9 commit 44c1993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions supernode/store/local_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (ls *localStorage) Put(ctx context.Context, raw *Raw, data io.Reader) error
lock(path, raw.Offset, false)
defer unLock(path, raw.Offset, false)

f, err := fileutils.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_SYNC, 0644)
f, err := fileutils.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0644)
if err != nil {
return err
}
Expand Down Expand Up @@ -210,7 +210,7 @@ func (ls *localStorage) PutBytes(ctx context.Context, raw *Raw, data []byte) err
lock(path, raw.Offset, false)
defer unLock(path, raw.Offset, false)

f, err := fileutils.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_SYNC, 0644)
f, err := fileutils.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0644)
if err != nil {
return err
}
Expand Down

0 comments on commit 44c1993

Please sign in to comment.