mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
internode lockArgs should use messagepack (#13329)
it would seem like using `bufio.Scan()` is very slow for heavy concurrent I/O, ie. when r.Body is slow , instead use a proper binary exchange format, to marshal and unmarshal the LockArgs datastructure in a cleaner way. this PR increases performance of the locking sub-system for tiny repeated read lock requests on same object. ``` BenchmarkLockArgs BenchmarkLockArgs-4 6417609 185.7 ns/op 56 B/op 2 allocs/op BenchmarkLockArgsOld BenchmarkLockArgsOld-4 1187368 1015 ns/op 4096 B/op 1 allocs/op ```
This commit is contained in:
@@ -133,7 +133,9 @@ func (c *Client) Call(ctx context.Context, method string, values url.Values, bod
|
||||
}
|
||||
req.Header.Set("Authorization", "Bearer "+c.newAuthToken(req.URL.RawQuery))
|
||||
req.Header.Set("X-Minio-Time", time.Now().UTC().Format(time.RFC3339))
|
||||
req.Header.Set("Expect", "100-continue")
|
||||
if body != nil {
|
||||
req.Header.Set("Expect", "100-continue")
|
||||
}
|
||||
if length > 0 {
|
||||
req.ContentLength = length
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user