mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: proxies set keep-alive timeouts to be system dependent (#10199)
Split the DialContext's one for internode and another for all other external communications especially proxy forwarders, gateway transport etc.
This commit is contained in:
@@ -40,8 +40,10 @@ import (
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/klauspost/readahead"
|
||||
"github.com/minio/minio/cmd/config"
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/minio/minio/pkg/disk"
|
||||
"github.com/minio/minio/pkg/env"
|
||||
xioutil "github.com/minio/minio/pkg/ioutil"
|
||||
"github.com/minio/minio/pkg/mountinfo"
|
||||
)
|
||||
@@ -93,6 +95,8 @@ type xlStorage struct {
|
||||
|
||||
pool sync.Pool
|
||||
|
||||
globalSync bool
|
||||
|
||||
diskMount bool // indicates if the path is an actual mount.
|
||||
|
||||
diskID string
|
||||
@@ -245,7 +249,8 @@ func newXLStorage(path string, hostname string) (*xlStorage, error) {
|
||||
return &b
|
||||
},
|
||||
},
|
||||
diskMount: mountinfo.IsLikelyMountPoint(path),
|
||||
globalSync: env.Get(config.EnvFSOSync, config.EnableOn) == config.EnableOn,
|
||||
diskMount: mountinfo.IsLikelyMountPoint(path),
|
||||
// Allow disk usage crawler to run with up to 2 concurrent
|
||||
// I/O ops, if and when activeIOCount reaches this
|
||||
// value disk usage routine suspends the crawler
|
||||
@@ -1216,8 +1221,10 @@ func (s *xlStorage) renameLegacyMetadata(volume, path string) error {
|
||||
// Renaming xl.json to xl.meta should be fully synced to disk.
|
||||
defer func() {
|
||||
if err == nil {
|
||||
// Sync to disk only upon success.
|
||||
globalSync()
|
||||
if s.globalSync {
|
||||
// Sync to disk only upon success.
|
||||
globalSync()
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -2104,8 +2111,10 @@ func (s *xlStorage) RenameData(srcVolume, srcPath, dataDir, dstVolume, dstPath s
|
||||
return osErrToFileErr(err)
|
||||
}
|
||||
|
||||
// Sync all the previous directory operations.
|
||||
globalSync()
|
||||
if s.globalSync {
|
||||
// Sync all the previous directory operations.
|
||||
globalSync()
|
||||
}
|
||||
|
||||
for _, entry := range entries {
|
||||
if entry == xlStorageFormatFile {
|
||||
@@ -2121,7 +2130,9 @@ func (s *xlStorage) RenameData(srcVolume, srcPath, dataDir, dstVolume, dstPath s
|
||||
}
|
||||
|
||||
// Sync all the metadata operations once renames are done.
|
||||
globalSync()
|
||||
if s.globalSync {
|
||||
globalSync()
|
||||
}
|
||||
}
|
||||
|
||||
var oldDstDataPath string
|
||||
|
||||
Reference in New Issue
Block a user