Vendorize recent fixes in dsync (#3365)

* Update 'i' only if lock grant read from buffered channel
This commit is contained in:
Krishnan Parthasarathi 2016-11-29 12:33:46 +05:30 committed by Harshavardhana
parent bcd1a2308b
commit a609a4126c
4 changed files with 9 additions and 6 deletions

View File

@ -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):
```
$ 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`)_

View File

@ -154,7 +154,7 @@ func (dm *DRWMutex) lockBlocking(isReadLock 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)
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
// and release any locks that did get acquired
done = true
// Increment the number of grants received from the buffered channel.
i++
releaseAll(clnts, locks, lockName, isReadLock)
}
}

View File

@ -34,6 +34,7 @@ var ownNode int
// Simple majority based quorum, set to dNodeCount/2+1
var dquorum int
// Simple quorum for read operations, set to dNodeCount/2
var dquorumReads int

6
vendor/vendor.json vendored
View File

@ -111,10 +111,10 @@
"revisionTime": "2015-11-18T20:00:48-08:00"
},
{
"checksumSHA1": "UWpLeW+oLfe/MiphMckp1HqKrW0=",
"checksumSHA1": "ddMyebkzU3xB7K8dAhM1S+Mflmo=",
"path": "github.com/minio/dsync",
"revision": "fcea3bf5533c1b8a5af3cb377d30363782d2532d",
"revisionTime": "2016-10-15T15:40:54Z"
"revision": "dd0da3743e6668b03559c2905cc661bc0fceeae3",
"revisionTime": "2016-11-28T22:07:34Z"
},
{
"path": "github.com/minio/go-homedir",