[ARVADOS] updated: 1.1.0-24-ga8d5927

Git user git at public.curoverse.com
Sat Oct 14 11:58:36 EDT 2017


Summary of changes:
 sdk/go/keepclient/block_cache.go |  8 ++++----
 services/crunch-run/crunchrun.go | 11 ++++++-----
 2 files changed, 10 insertions(+), 9 deletions(-)

       via  a8d59274b32098abcc6b36b46ae354de3dcd13ad (commit)
      from  4a09e252ea6dd94e14cdf5ddb324ccf574b42423 (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 a8d59274b32098abcc6b36b46ae354de3dcd13ad
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Sat Oct 14 11:58:14 2017 -0400

    12447: Use ReadFull().  Use goimport for import formatting.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/sdk/go/keepclient/block_cache.go b/sdk/go/keepclient/block_cache.go
index 23fd331..ca19f41 100644
--- a/sdk/go/keepclient/block_cache.go
+++ b/sdk/go/keepclient/block_cache.go
@@ -5,7 +5,6 @@
 package keepclient
 
 import (
-	"bytes"
 	"io"
 	"sort"
 	"sync"
@@ -65,10 +64,11 @@ func (c *BlockCache) Get(kc *KeepClient, locator string) ([]byte, error) {
 		}
 		c.cache[cacheKey] = b
 		go func() {
-			rdr, _, _, err := kc.Get(locator)
-			data := bytes.NewBuffer(make([]byte, 0, BLOCKSIZE))
+			rdr, size, _, err := kc.Get(locator)
+			var data []byte
 			if err == nil {
-				_, err = io.Copy(data, rdr)
+				data := make([]byte, size, BLOCKSIZE)
+				_, err = io.ReadFull(rdr, data)
 				err2 := rdr.Close()
 				if err == nil {
 					err = err2
diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go
index 8d437a8..7d5ee7e 100644
--- a/services/crunch-run/crunchrun.go
+++ b/services/crunch-run/crunchrun.go
@@ -11,11 +11,6 @@ import (
 	"errors"
 	"flag"
 	"fmt"
-	"git.curoverse.com/arvados.git/lib/crunchstat"
-	"git.curoverse.com/arvados.git/sdk/go/arvados"
-	"git.curoverse.com/arvados.git/sdk/go/arvadosclient"
-	"git.curoverse.com/arvados.git/sdk/go/keepclient"
-	"git.curoverse.com/arvados.git/sdk/go/manifest"
 	"io"
 	"io/ioutil"
 	"log"
@@ -32,6 +27,12 @@ import (
 	"syscall"
 	"time"
 
+	"git.curoverse.com/arvados.git/lib/crunchstat"
+	"git.curoverse.com/arvados.git/sdk/go/arvados"
+	"git.curoverse.com/arvados.git/sdk/go/arvadosclient"
+	"git.curoverse.com/arvados.git/sdk/go/keepclient"
+	"git.curoverse.com/arvados.git/sdk/go/manifest"
+
 	dockertypes "github.com/docker/docker/api/types"
 	dockercontainer "github.com/docker/docker/api/types/container"
 	dockernetwork "github.com/docker/docker/api/types/network"

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list