Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of the investigation into the implementation of a genuine HEAD API to Riak, the current GET code and its use of HEADs was reviewed. The outcome of this review was:
This PR adds comments and specs. It also refactors the code in attempt to both improve readability and consistency of behaviour. The unit tests have then been expanded to reflect this.
The change also removes an is_x_deleted check, as deleted tombstones (even when fetched by HEAD requests) should already not require fetching as they have already been converted into actual objects (not just HEAD objects) - https://github.com/basho/riak_kv/blob/riak_kv-2.9.0p4/src/riak_kv_get_core.erl#L109-L119.