mirror of
https://github.com/minio/minio.git
synced 2025-04-16 00:49:09 -04:00
Vendorize recent fixes in dsync (#3365)
* Update 'i' only if lock grant read from buffered channel
This commit is contained in:
parent
bcd1a2308b
commit
a609a4126c
2
vendor/github.com/minio/dsync/README.md
generated
vendored
2
vendor/github.com/minio/dsync/README.md
generated
vendored
@ -16,7 +16,7 @@ This package was developed for the distributed server version of [Minio Object S
|
|||||||
For [minio](https://minio.io/) the distributed version is started as follows (for a 6-server system):
|
For [minio](https://minio.io/) the distributed version is started as follows (for a 6-server system):
|
||||||
|
|
||||||
```
|
```
|
||||||
$ minio server server1/disk server2/disk server3/disk server4/disk server5/disk server6/disk
|
$ minio server server1:/disk server2:/disk server3:/disk server4:/disk server5:/disk server6:/disk
|
||||||
```
|
```
|
||||||
|
|
||||||
_(note that the same identical command should be run on servers `server1` through to `server6`)_
|
_(note that the same identical command should be run on servers `server1` through to `server6`)_
|
||||||
|
4
vendor/github.com/minio/dsync/drwmutex.go
generated
vendored
4
vendor/github.com/minio/dsync/drwmutex.go
generated
vendored
@ -154,7 +154,7 @@ func (dm *DRWMutex) lockBlocking(isReadLock bool) {
|
|||||||
//
|
//
|
||||||
func lock(clnts []RPC, locks *[]string, lockName string, isReadLock bool) bool {
|
func lock(clnts []RPC, locks *[]string, lockName string, isReadLock bool) bool {
|
||||||
|
|
||||||
// Create buffered channel of quorum size
|
// Create buffered channel of size equal to total number of nodes.
|
||||||
ch := make(chan Granted, dnodeCount)
|
ch := make(chan Granted, dnodeCount)
|
||||||
|
|
||||||
for index, c := range clnts {
|
for index, c := range clnts {
|
||||||
@ -216,6 +216,8 @@ func lock(clnts []RPC, locks *[]string, lockName string, isReadLock bool) bool {
|
|||||||
// We know that we are not going to get the lock anymore, so exit out
|
// We know that we are not going to get the lock anymore, so exit out
|
||||||
// and release any locks that did get acquired
|
// and release any locks that did get acquired
|
||||||
done = true
|
done = true
|
||||||
|
// Increment the number of grants received from the buffered channel.
|
||||||
|
i++
|
||||||
releaseAll(clnts, locks, lockName, isReadLock)
|
releaseAll(clnts, locks, lockName, isReadLock)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
vendor/github.com/minio/dsync/dsync.go
generated
vendored
3
vendor/github.com/minio/dsync/dsync.go
generated
vendored
@ -34,6 +34,7 @@ var ownNode int
|
|||||||
|
|
||||||
// Simple majority based quorum, set to dNodeCount/2+1
|
// Simple majority based quorum, set to dNodeCount/2+1
|
||||||
var dquorum int
|
var dquorum int
|
||||||
|
|
||||||
// Simple quorum for read operations, set to dNodeCount/2
|
// Simple quorum for read operations, set to dNodeCount/2
|
||||||
var dquorumReads int
|
var dquorumReads int
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ func SetNodesWithClients(rpcClnts []RPC, rpcOwnNode int) (err error) {
|
|||||||
|
|
||||||
dnodeCount = len(rpcClnts)
|
dnodeCount = len(rpcClnts)
|
||||||
dquorum = dnodeCount/2 + 1
|
dquorum = dnodeCount/2 + 1
|
||||||
dquorumReads = dnodeCount/2
|
dquorumReads = dnodeCount / 2
|
||||||
// Initialize node name and rpc path for each RPCClient object.
|
// Initialize node name and rpc path for each RPCClient object.
|
||||||
clnts = make([]RPC, dnodeCount)
|
clnts = make([]RPC, dnodeCount)
|
||||||
copy(clnts, rpcClnts)
|
copy(clnts, rpcClnts)
|
||||||
|
6
vendor/vendor.json
vendored
6
vendor/vendor.json
vendored
@ -111,10 +111,10 @@
|
|||||||
"revisionTime": "2015-11-18T20:00:48-08:00"
|
"revisionTime": "2015-11-18T20:00:48-08:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "UWpLeW+oLfe/MiphMckp1HqKrW0=",
|
"checksumSHA1": "ddMyebkzU3xB7K8dAhM1S+Mflmo=",
|
||||||
"path": "github.com/minio/dsync",
|
"path": "github.com/minio/dsync",
|
||||||
"revision": "fcea3bf5533c1b8a5af3cb377d30363782d2532d",
|
"revision": "dd0da3743e6668b03559c2905cc661bc0fceeae3",
|
||||||
"revisionTime": "2016-10-15T15:40:54Z"
|
"revisionTime": "2016-11-28T22:07:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/minio/go-homedir",
|
"path": "github.com/minio/go-homedir",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user