From 9aaf541e054f177f69e0643bd15d72ea6ed9df92 Mon Sep 17 00:00:00 2001 From: UENISHI Kota Date: Thu, 23 Jul 2015 18:35:39 +0900 Subject: [PATCH] Remove shadowing --- src/stanchion_multipart.erl | 4 +--- src/stanchion_utils.erl | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/stanchion_multipart.erl b/src/stanchion_multipart.erl index 788e8d7..ed5ffc2 100644 --- a/src/stanchion_multipart.erl +++ b/src/stanchion_multipart.erl @@ -190,9 +190,7 @@ check_no_multipart_uploads(Bucket, RiakPid) -> %% check all up lists:all(fun(Key) -> - {GetResult, TAT} = - ?TURNAROUND_TIME(riakc_pb_socket:get(RiakPid, HashBucket, Key)), - stanchion_stats:update([riakc, get_manifest], TAT), + GetResult = stanchion_utils:get_manifests_raw(RiakPid, Bucket, Key), has_no_upload(GetResult) end, Keys). diff --git a/src/stanchion_utils.erl b/src/stanchion_utils.erl index 20ebec5..c868ca4 100644 --- a/src/stanchion_utils.erl +++ b/src/stanchion_utils.erl @@ -32,6 +32,7 @@ get_admin_creds/0, get_keys_and_values/1, get_manifests/3, + get_manifests_raw/3, has_tombstone/1, pow/2, pow/3, @@ -598,6 +599,10 @@ is_bucket_clean(Bucket, RiakPid, BucketObj) -> {true, BucketObj} end end + catch T:E -> + _ = lager:error("Could not check whether bucket was empty. Reason: ~p:~p - ~p", + [T,E,erlang:get_stacktrace()]), + error({T, E}) after close_manifest_connection(RiakPid, ManifestRiakPid) end.