Vendorize recent fixes in dsync (#3365)

* Update 'i' only if lock grant read from buffered channel
master
Krishnan Parthasarathi 8 years ago committed by Harshavardhana
parent bcd1a2308b
commit a609a4126c
  1. 2
      vendor/github.com/minio/dsync/README.md
  2. 4
      vendor/github.com/minio/dsync/drwmutex.go
  3. 3
      vendor/github.com/minio/dsync/dsync.go
  4. 6
      vendor/vendor.json

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

@ -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)
}
}

@ -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
@ -59,7 +60,7 @@ func SetNodesWithClients(rpcClnts []RPC, rpcOwnNode int) (err error) {
dnodeCount = len(rpcClnts)
dquorum = dnodeCount/2 + 1
dquorumReads = dnodeCount/2
dquorumReads = dnodeCount / 2
// Initialize node name and rpc path for each RPCClient object.
clnts = make([]RPC, dnodeCount)
copy(clnts, rpcClnts)

@ -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",

Loading…
Cancel
Save