Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:22
riak_core
riak_core-2.1.8-fix-now.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File riak_core-2.1.8-fix-now.patch of Package riak_core
diff -Ndurp riak_core-2.1.8/src/hashtree.erl riak_core-2.1.8-fix-now/src/hashtree.erl --- riak_core-2.1.8/src/hashtree.erl 2016-11-07 22:35:18.000000000 +0200 +++ riak_core-2.1.8-fix-now/src/hashtree.erl 2017-02-12 20:38:15.009028458 +0200 @@ -695,7 +695,7 @@ new_segment_store(Opts, State) -> DataDir = case proplists:get_value(segment_path, Opts) of undefined -> Root = "/tmp/anti/level", - <<P:128/integer>> = md5(term_to_binary({erlang:now(), make_ref()})), + <<P:128/integer>> = md5(term_to_binary({os:timestamp(), make_ref()})), filename:join(Root, integer_to_list(P)); SegmentPath -> SegmentPath @@ -712,7 +712,7 @@ new_segment_store(Opts, State) -> %% flushed to disk at once when under a heavy uniform load. WriteBufferMin = proplists:get_value(write_buffer_size_min, Config, DefaultWriteBufferMin), WriteBufferMax = proplists:get_value(write_buffer_size_max, Config, DefaultWriteBufferMax), - {Offset, _} = random:uniform_s(1 + WriteBufferMax - WriteBufferMin, now()), + {Offset, _} = random:uniform_s(1 + WriteBufferMax - WriteBufferMin, os:timestamp()), WriteBufferSize = WriteBufferMin + Offset, Config2 = orddict:store(write_buffer_size, WriteBufferSize, Config), Config3 = orddict:erase(write_buffer_size_min, Config2), diff -Ndurp riak_core-2.1.8/src/hashtree_tree.erl riak_core-2.1.8-fix-now/src/hashtree_tree.erl --- riak_core-2.1.8/src/hashtree_tree.erl 2016-11-07 22:35:18.000000000 +0200 +++ riak_core-2.1.8-fix-now/src/hashtree_tree.erl 2017-02-12 20:38:23.696795844 +0200 @@ -565,7 +565,7 @@ data_root(Opts) -> case proplists:get_value(data_dir, Opts) of undefined -> Base = "/tmp/hashtree_tree", - <<P:128/integer>> = riak_core_util:md5(term_to_binary(erlang:now())), + <<P:128/integer>> = riak_core_util:md5(term_to_binary(os:timestamp())), filename:join(Base, riak_core_util:integer_to_list(P, 16)); Root -> Root end. diff -Ndurp riak_core-2.1.8/src/riak_core_claimant.erl riak_core-2.1.8-fix-now/src/riak_core_claimant.erl --- riak_core-2.1.8/src/riak_core_claimant.erl 2016-11-07 22:35:18.000000000 +0200 +++ riak_core-2.1.8-fix-now/src/riak_core_claimant.erl 2017-02-12 20:39:08.351600214 +0200 @@ -223,7 +223,7 @@ bucket_type_iterator() -> %%%=================================================================== reassign_indices(CState) -> - reassign_indices(CState, [], erlang:now(), fun no_log/2). + reassign_indices(CState, [], os:timestamp(), fun no_log/2). %%%=================================================================== %%% Internal API helpers @@ -250,7 +250,7 @@ maybe_filter_inactive_type(true, Default init([]) -> schedule_tick(), - {ok, #state{changes=[], seed=erlang:now()}}. + {ok, #state{changes=[], seed=os:timestamp()}}. handle_call(clear, _From, State) -> State2 = clear_staged(State), @@ -388,7 +388,7 @@ commit_staged(State) -> {ok, _} -> State2 = State#state{next_ring=undefined, changes=[], - seed=erlang:now()}, + seed=os:timestamp()}, {ok, State2}; not_changed -> {error, State}; @@ -438,7 +438,7 @@ maybe_commit_staged(Ring, NextRing, #sta %% call {@link clear/0}. clear_staged(State) -> remove_joining_nodes(), - State#state{changes=[], seed=erlang:now()}. + State#state{changes=[], seed=os:timestamp()}. %% @private remove_joining_nodes() -> @@ -662,7 +662,7 @@ maybe_force_ring_update(Ring) -> end. do_maybe_force_ring_update(Ring) -> - case compute_next_ring([], erlang:now(), Ring) of + case compute_next_ring([], os:timestamp(), Ring) of {ok, NextRing} -> case same_plan(Ring, NextRing) of false -> @@ -1109,7 +1109,7 @@ internal_ring_changed(Node, CState) -> %% Set cluster name if it is undefined case {IsClaimant, riak_core_ring:cluster_name(CState5)} of {true, undefined} -> - ClusterName = {Node, erlang:now()}, + ClusterName = {Node, os:timestamp()}, {_,_} = riak_core_util:rpc_every_member(riak_core_ring_manager, set_cluster_name, [ClusterName], @@ -1143,7 +1143,7 @@ do_claimant_quiet(Node, CState, Replacin do_claimant(Node, CState, Replacing, Seed, fun no_log/2). do_claimant(Node, CState, Log) -> - do_claimant(Node, CState, [], erlang:now(), Log). + do_claimant(Node, CState, [], os:timestamp(), Log). do_claimant(Node, CState, Replacing, Seed, Log) -> AreJoining = are_joining_nodes(CState), diff -Ndurp riak_core-2.1.8/src/riak_core_gossip.erl riak_core-2.1.8-fix-now/src/riak_core_gossip.erl --- riak_core-2.1.8/src/riak_core_gossip.erl 2016-11-07 22:35:18.000000000 +0200 +++ riak_core-2.1.8-fix-now/src/riak_core_gossip.erl 2017-02-12 20:39:20.499274961 +0200 @@ -397,7 +397,7 @@ log_node_removed(Node, Old) -> lager:info("'~s' removed from cluster (previously: '~s')~n", [Node, Old]). remove_from_cluster(Ring, ExitingNode) -> - remove_from_cluster(Ring, ExitingNode, erlang:now()). + remove_from_cluster(Ring, ExitingNode, os:timestamp()). remove_from_cluster(Ring, ExitingNode, Seed) -> % Get a list of indices owned by the ExitingNode... diff -Ndurp riak_core-2.1.8/src/riak_core_ring.erl riak_core-2.1.8-fix-now/src/riak_core_ring.erl --- riak_core-2.1.8/src/riak_core_ring.erl 2016-11-07 22:35:18.000000000 +0200 +++ riak_core-2.1.8-fix-now/src/riak_core_ring.erl 2017-02-12 20:39:28.383063875 +0200 @@ -357,7 +357,7 @@ fresh(RingSize, NodeName) -> VClock=vclock:increment(NodeName, vclock:fresh()), GossipVsn = riak_core_gossip:gossip_version(), ?CHSTATE{nodename=NodeName, - clustername={NodeName, erlang:now()}, + clustername={NodeName, os:timestamp()}, members=[{NodeName, {valid, VClock, [{gossip_vsn, GossipVsn}]}}], chring=chash:fresh(RingSize, NodeName), next=[], diff -Ndurp riak_core-2.1.8/src/riak_core_ring_manager.erl riak_core-2.1.8-fix-now/src/riak_core_ring_manager.erl --- riak_core-2.1.8/src/riak_core_ring_manager.erl 2016-11-07 22:35:18.000000000 +0200 +++ riak_core-2.1.8-fix-now/src/riak_core_ring_manager.erl 2017-02-12 20:39:50.814465136 +0200 @@ -222,7 +222,7 @@ force_update() -> ring_trans( fun(Ring, _) -> NewRing = riak_core_ring:update_member_meta(node(), Ring, node(), - unused, now()), + unused, os:timestamp()), {new_ring, NewRing} end, []), ok. diff -Ndurp riak_core-2.1.8/src/supervisor_pre_r14b04.erl riak_core-2.1.8-fix-now/src/supervisor_pre_r14b04.erl --- riak_core-2.1.8/src/supervisor_pre_r14b04.erl 2016-11-07 22:35:18.000000000 +0200 +++ riak_core-2.1.8-fix-now/src/supervisor_pre_r14b04.erl 2017-02-12 20:39:58.782252679 +0200 @@ -1188,7 +1188,7 @@ add_restart(State) -> I = State#state.intensity, P = State#state.period, R = State#state.restarts, - Now = erlang:now(), + Now = os:timestamp(), R1 = add_restart([Now|R], Now, P), State1 = State#state{restarts = R1}, case length(R1) of
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor