Skip to content

Commit

Permalink
Merge branch '1.2'
Browse files Browse the repository at this point in the history
Conflicts:
	rebar.config
  • Loading branch information
jaredmorrow committed Aug 6, 2012
2 parents ccb6078 + 33121c5 commit d796c33
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/riak_kv_eleveldb_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,21 @@ init_state(DataRoot, Config) ->
%% Use read options for folding, but FORCE fill_cache to false
FoldOpts = lists:keystore(fill_cache, 1, ReadOpts, {fill_cache, false}),

%% Warn if block_size is set
SSTBS = proplists:get_value(sst_block_size, OpenOpts, false),
BS = proplists:get_value(block_size, OpenOpts, false),
case BS /= false andalso SSTBS == false of
true ->
lager:warning("eleveldb block_size has been renamed sst_block_size "
"and the current setting of ~p is being ignored. "
"Changing sst_block_size is strongly cautioned "
"against unless you know what you are doing. Remove "
"block_size from app.config to get rid of this "
"message.\n", [BS]);
_ ->
ok
end,

%% Generate a debug message with the options we'll use for each operation
lager:debug("Datadir ~s options for LevelDB: ~p\n",
[DataRoot, [{open, OpenOpts}, {read, ReadOpts}, {write, WriteOpts}, {fold, FoldOpts}]]),
Expand Down
2 changes: 1 addition & 1 deletion src/riak_kv_wm_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ is_null_origin(RD) ->
%% @doc Validate that the Referer matches up with scheme, host and port of the
%% machine that received the request.
is_valid_referer(RD) ->
OriginTuple = {wrq:scheme(RD), string:join(wrq:host_tokens(RD), "."), wrq:port(RD)},
OriginTuple = {wrq:scheme(RD), string:join(lists:reverse(wrq:host_tokens(RD)), "."), wrq:port(RD)},
case referer_tuple(RD) of
undefined ->
true;
Expand Down

0 comments on commit d796c33

Please sign in to comment.