Skip to content

Commit

Permalink
log the missing bucket type name when returning {error, no_type}
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Caswell committed Feb 29, 2016
1 parent ffd5d8a commit ac92614
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/riak_core_bucket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ set_bucket({<<"default">>, Name}, BucketProps) ->
set_bucket(Name, BucketProps);
set_bucket({Type, _Name}=Bucket, BucketProps0) ->
case riak_core_bucket_type:get(Type) of
undefined -> {error, no_type};
undefined ->
lager:error("Attempt to set properties of non-existant bucket type ~p", [Bucket]),
{error, no_type};
_ -> set_bucket(fun set_bucket_in_metadata/2, Bucket, BucketProps0)
end;
set_bucket(Name, BucketProps0) ->
Expand Down Expand Up @@ -114,7 +116,9 @@ get_bucket({Type, _Name}=Bucket) ->
BucketMeta = riak_core_metadata:get(?METADATA_PREFIX, bucket_key(Bucket),
[{resolver, fun riak_core_bucket_props:resolve/2}]),
case merge_type_props(TypeMeta, BucketMeta) of
{error, _}=Error -> Error;
{error, _}=Error ->
lager:error("~p getting properties of bucket ~p",[Error,Bucket]),
Error;
Props -> [{name, Bucket} | Props]
end;
get_bucket(Name) ->
Expand Down

5 comments on commit ac92614

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from bsparrow435, bsparrow435
at ac92614

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging basho/riak_core/jhc-log_no_type = ac92614 into borshop-integration-819-jhc-log_no_type

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basho/riak_core/jhc-log_no_type = ac92614 merged ok, testing candidate = fb9493a

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding 2.0 to borshop-integration-819-jhc-log_no_type = fb9493a

Please sign in to comment.