[ARVADOS] updated: 1.2.0-45-gd9224c405

Git user git at public.curoverse.com
Mon Sep 17 14:38:20 EDT 2018


Summary of changes:
 sdk/go/keepclient/discover.go | 13 ++++++++-----
 sdk/go/keepclient/support.go  |  2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)

       via  d9224c40587a8d3617e7be01f3bb7f801c4b52e4 (commit)
       via  ddc180fa5200d9d8fac59cc5041d7d452b68e6a2 (commit)
      from  8e7c30852f1cf244ae3c58e93acea705739e8625 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d9224c40587a8d3617e7be01f3bb7f801c4b52e4
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Mon Sep 17 14:34:05 2018 -0400

    13994: Fix missing error message.
    
    When the request failed too early to produce an HTTP status code, the
    error returned to the client was:
    
    "Could not write sufficient replicas: [0] ; [0] "
    
    Now the error message is included. It gets truncated to 100 chars
    later on, but it's something:
    
    "Could not write sufficient replicas: [0] Put
    http://localhost:52367/831f95ffae4233b52059fbb8a0c62fbf: dial tcp [::1
    ]:52367: connect: conn; [0] Put
    http://localhost:53807/831f95ffae4233b52059fbb8a0c62fbf: dial tcp
    [::1]:53807: connect: conn"
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/sdk/go/keepclient/support.go b/sdk/go/keepclient/support.go
index 542827f5e..e589593fa 100644
--- a/sdk/go/keepclient/support.go
+++ b/sdk/go/keepclient/support.go
@@ -87,7 +87,7 @@ func (this *KeepClient) uploadToKeepServer(host string, hash string, body io.Rea
 	var resp *http.Response
 	if resp, err = this.httpClient().Do(req); err != nil {
 		DebugPrintf("DEBUG: [%s] Upload failed %v error: %v", reqid, url, err.Error())
-		upload_status <- uploadStatus{err, url, 0, 0, ""}
+		upload_status <- uploadStatus{err, url, 0, 0, err.Error()}
 		return
 	}
 

commit ddc180fa5200d9d8fac59cc5041d7d452b68e6a2
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Mon Sep 17 14:33:59 2018 -0400

    13994: Fix service discovery race.
    
    Making keepclient.RefreshServiceDiscovery asynchronous didn't work
    out: tests rely on it to ensure old services won't be used.
    
    Instead, speed things up a bit by refreshing all known clients'
    service lists concurrently instead of serially.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/sdk/go/keepclient/discover.go b/sdk/go/keepclient/discover.go
index 6778b39fb..4377c1951 100644
--- a/sdk/go/keepclient/discover.go
+++ b/sdk/go/keepclient/discover.go
@@ -22,12 +22,15 @@ import (
 func RefreshServiceDiscovery() {
 	svcListCacheMtx.Lock()
 	defer svcListCacheMtx.Unlock()
+	var wg sync.WaitGroup
 	for _, ent := range svcListCache {
-		select {
-		case ent.clear <- struct{}{}:
-		default:
-		}
+		wg.Add(1)
+		go func() {
+			ent.clear <- struct{}{}
+			wg.Done()
+		}()
 	}
+	wg.Wait()
 }
 
 // ClearCacheOnSIGHUP installs a signal handler that calls
@@ -139,7 +142,7 @@ func (kc *KeepClient) discoverServices() error {
 		arv := *kc.Arvados
 		cacheEnt = cachedSvcList{
 			latest: make(chan svcList),
-			clear:  make(chan struct{}, 1),
+			clear:  make(chan struct{}),
 			arv:    &arv,
 		}
 		go cacheEnt.poll()

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list