[ARVADOS] updated: 421c879e077ce8f644553ba3a1481cb55529ee33

git at public.curoverse.com git at public.curoverse.com
Tue Jul 14 16:34:14 EDT 2015


Summary of changes:
 services/keepstore/keepstore.go    |  4 ++++
 services/keepstore/trash_worker.go | 12 ++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

       via  421c879e077ce8f644553ba3a1481cb55529ee33 (commit)
      from  66380d0e89c00559123ceda8e74e3b1487f4a95a (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 421c879e077ce8f644553ba3a1481cb55529ee33
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Jul 14 16:34:54 2015 -0400

    6221: Check never_delete must be true.

diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go
index e55e0ef..3dfdce2 100644
--- a/services/keepstore/keepstore.go
+++ b/services/keepstore/keepstore.go
@@ -288,6 +288,10 @@ func main() {
 
 	flag.Parse()
 
+	if never_delete != true {
+		log.Fatal("never_delete must be true, see #6221")
+	}
+
 	if maxBuffers < 0 {
 		log.Fatal("-max-buffers must be greater than zero.")
 	}
diff --git a/services/keepstore/trash_worker.go b/services/keepstore/trash_worker.go
index 52f5e75..6257f7b 100644
--- a/services/keepstore/trash_worker.go
+++ b/services/keepstore/trash_worker.go
@@ -39,16 +39,16 @@ func TrashItem(trashRequest TrashRequest) {
 			continue
 		}
 
-		if !never_delete {
-			err = volume.Delete(trashRequest.Locator)
-		} else {
+		if never_delete {
 			err = errors.New("did not delete block because never_delete is true")
+		} else {
+			err = volume.Delete(trashRequest.Locator)
 		}
 
-		if err == nil {
-			log.Printf("%v Delete(%v) OK", volume, trashRequest.Locator)
-		} else {
+		if err != nil {
 			log.Printf("%v Delete(%v): %v", volume, trashRequest.Locator, err)
+		} else {
+			log.Printf("%v Delete(%v) OK", volume, trashRequest.Locator)
 		}
 	}
 }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list