Browse files

Merge branch '1.0'

Conflicts:
	rebar.config
	src/riak_kv_bitcask_backend.erl
  • Loading branch information...
2 parents c5a0cbe + 571f5cd commit 1353a04ca1418aad7c633dcb5c38f8a5e192892c @rustyio rustyio committed Dec 15, 2011
Showing with 11 additions and 2 deletions.
  1. +1 −1 src/riak_kv.app.src
  2. +2 −1 src/riak_kv_delete.erl
  3. +2 −0 src/riak_kv_wm_raw.hrl
  4. +6 −0 src/riak_kv_wm_utils.erl
View
2 src/riak_kv.app.src
@@ -3,7 +3,7 @@
{application, riak_kv,
[
{description, "Riak Key/Value Store"},
- {vsn, "1.0.1"},
+ {vsn, "1.0.2"},
{applications, [
kernel,
stdlib,
View
3 src/riak_kv_delete.erl
@@ -27,6 +27,7 @@
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
+-include("riak_kv_wm_raw.hrl").
-export([start_link/6, start_link/7, start_link/8, delete/8]).
@@ -72,7 +73,7 @@ delete(ReqId,Bucket,Key,Options,Timeout,Client,ClientId,VClock) ->
{error, Reason} ->
Client ! {ReqId, {error, Reason}};
{W, PW, DW} ->
- Obj0 = riak_object:new(Bucket, Key, <<>>, dict:store(<<"X-Riak-Deleted">>,
+ Obj0 = riak_object:new(Bucket, Key, <<>>, dict:store(?MD_DELETED,
"true", dict:new())),
Tombstone = riak_object:set_vclock(Obj0, VClock),
{ok,C} = riak:local_client(ClientId),
View
2 src/riak_kv_wm_raw.hrl
@@ -23,6 +23,7 @@
-define(MD_LASTMOD, <<"X-Riak-Last-Modified">>).
-define(MD_USERMETA, <<"X-Riak-Meta">>).
-define(MD_INDEX, <<"index">>).
+-define(MD_DELETED, <<"X-Riak-Deleted">>).
%% Names of HTTP header fields
-define(HEAD_CTYPE, "Content-Type").
@@ -32,6 +33,7 @@
-define(HEAD_CLIENT, "X-Riak-ClientId").
-define(HEAD_USERMETA_PREFIX, "x-riak-meta-").
-define(HEAD_INDEX_PREFIX, "x-riak-index-").
+-define(HEAD_DELETED, "X-Riak-Deleted").
%% Names of JSON fields in bucket properties
-define(JSON_PROPS, <<"props">>).
View
6 src/riak_kv_wm_utils.erl
@@ -121,6 +121,12 @@ multipart_encode_body(Prefix, Bucket, {MD, V}, APIVersion) ->
Rfc1123
end,
"\r\n",
+ case dict:find(?MD_DELETED, MD) of
+ {ok, "true"} ->
+ [?HEAD_DELETED, ": true\r\n"];
+ error ->
+ []
+ end,
case dict:find(?MD_USERMETA, MD) of
{ok, M} ->
lists:foldl(fun({Hdr,Val},Acc) ->

0 comments on commit 1353a04

Please sign in to comment.