mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
remove MINIO_IO_DEADLINE support (#11841)
this feature in actual deployment was found to be not that useful, remove support for this for now.
This commit is contained in:
parent
94ff624242
commit
9a6487319a
@ -23,11 +23,8 @@ import (
|
||||
"fmt"
|
||||
"hash"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/minio/minio/pkg/env"
|
||||
xioutil "github.com/minio/minio/pkg/ioutil"
|
||||
)
|
||||
|
||||
type errHashMismatch struct {
|
||||
@ -73,21 +70,12 @@ func (b *streamingBitrotWriter) Close() error {
|
||||
return err
|
||||
}
|
||||
|
||||
var (
|
||||
ioDeadline, _ = time.ParseDuration(env.Get("MINIO_IO_DEADLINE", ""))
|
||||
)
|
||||
|
||||
// Returns streaming bitrot writer implementation.
|
||||
func newStreamingBitrotWriter(disk StorageAPI, volume, filePath string, length int64, algo BitrotAlgorithm, shardSize int64, heal bool) io.Writer {
|
||||
r, w := io.Pipe()
|
||||
h := algo.New()
|
||||
|
||||
var wc io.WriteCloser = w
|
||||
if ioDeadline > 0 && !heal {
|
||||
wc = xioutil.NewDeadlineWriter(w, ioDeadline)
|
||||
}
|
||||
|
||||
bw := &streamingBitrotWriter{wc, h, shardSize, make(chan struct{})}
|
||||
bw := &streamingBitrotWriter{w, h, shardSize, make(chan struct{})}
|
||||
go func() {
|
||||
totalFileSize := int64(-1) // For compressed objects length will be unknown (represented by length=-1)
|
||||
if length != -1 {
|
||||
|
Loading…
Reference in New Issue
Block a user