[ARVADOS] updated: 3a1881893ea120db630121357bc05d945119792b

git at public.curoverse.com git at public.curoverse.com
Tue Jul 15 14:22:24 EDT 2014


Summary of changes:
 services/keep/src/keep/keep.go | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

       via  3a1881893ea120db630121357bc05d945119792b (commit)
      from  ca767f4ed048496a03355d1c695140b6a4ff56ac (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 3a1881893ea120db630121357bc05d945119792b
Author: Ward Vandewege <ward at curoverse.com>
Date:   Tue Jul 15 14:21:57 2014 -0400

    3220: fix tests

diff --git a/services/keep/src/keep/keep.go b/services/keep/src/keep/keep.go
index de1c240..15b73ff 100644
--- a/services/keep/src/keep/keep.go
+++ b/services/keep/src/keep/keep.go
@@ -598,14 +598,21 @@ func GetBlock(hash string) ([]byte, error) {
 				//
 				log.Printf("%s: checksum mismatch for request %s (actual %s)\n",
 					vol, hash, filehash)
-				error_to_caller := DiskHashError
+				error_to_caller = DiskHashError
 			} else {
 				// Success!
+				if error_to_caller != NotFoundError {
+						log.Printf("%s: checksum mismatch for request %s but a good copy was found on another volume and returned\n",
+							vol, hash)
+				}
 				return buf, nil
 			}
 		}
 	}
 
+  if error_to_caller != NotFoundError {
+    log.Printf("%s: checksum mismatch, no good copy found\n", hash)
+  }
 	return nil, error_to_caller
 }
 
@@ -640,7 +647,7 @@ func PutBlock(block []byte, hash string) error {
 	blockhash := fmt.Sprintf("%x", md5.Sum(block))
 	if blockhash != hash {
 		log.Printf("%s: MD5 checksum %s did not match request", hash, blockhash)
-		return MD5Error
+		return RequestHashError
 	}
 
 	// If we already have a block on disk under this identifier, return

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list