Skip to content

Commit

Permalink
Merge pull request #235 from kianmeng/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
cmeiklejohn authored Mar 23, 2022
2 parents 9e8de7f + 78ec4eb commit 0a8bf8d
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 42 deletions.
4 changes: 2 additions & 2 deletions old-bin/counterexample-model-checker.escript
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ analyze(Pass, NumPassed0, NumFailed0, NumPruned0, PreloadOmissionFile, ReplayTra
%% Once we start omitting, omit everything after that's a message
%% send because we don't know what might be coming. In 2PC, if we
%% have a successful trace and omit a prepare -- we can't be guaranteed
%% to ever see a prepare vote or commmit.
%% to ever see a prepare vote or commit.
case InterpositionType of
forward_message ->
case lists:member(Line, Omissions) of
Expand Down Expand Up @@ -820,7 +820,7 @@ execute_schedule(PreloadOmissionFile, ReplayTraceFile, TraceFile, TraceLines, {I
_ ->
%% This failed.
io:format("Test FAILED!~n", []),
% io:format("Failing test contained the following omitted mesage types: ~p~n", [Omissions]),
% io:format("Failing test contained the following omitted message types: ~p~n", [Omissions]),

OmissionTypes = message_types(Omissions),
io:format("=> OmissionTypes: ~p~n", [OmissionTypes]),
Expand Down
2 changes: 1 addition & 1 deletion protocols/alsberg_day.erl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ handle_info({collaborate_ack, ReplyingNode, {write, From, Key, Value}}, #state{o

case lists:usort(Membership) =:= lists:usort(Replies) of
true ->
partisan_logger:info("Node ~p received all replies for request ~p, acknowleding to user.", [node(), Request]),
partisan_logger:info("Node ~p received all replies for request ~p, acknowledging to user.", [node(), Request]),
partisan_pluggable_peer_service_manager:forward_message(From, {ok, Value});
false ->
partisan_logger:info("Received replies from: ~p, but need replies from: ~p", [Replies, Membership -- Replies]),
Expand Down
4 changes: 2 additions & 2 deletions protocols/alsberg_day_acked.erl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ handle_info({collaborate_ack, ReplyingNode, {write, From, Key, Value}}, #state{o

Outstanding = case lists:usort(Membership) =:= lists:usort(Replies) of
true ->
partisan_logger:info("Node ~p received all replies for request ~p, acknowleding to user.", [node(), Request]),
partisan_logger:info("Node ~p received all replies for request ~p, acknowledging to user.", [node(), Request]),
partisan_pluggable_peer_service_manager:forward_message(From, {ok, Value}),
dict:erase(Request, Outstanding0);
false ->
Expand Down Expand Up @@ -309,7 +309,7 @@ handle_info({retry_collaborate_ack, ReplyingNode, {write, From, Key, Value}}, #s

case lists:usort(Membership) =:= lists:usort(Replies) of
true ->
partisan_logger:info("Node ~p received all replies for request ~p, acknowleding to user.", [node(), Request]),
partisan_logger:info("Node ~p received all replies for request ~p, acknowledging to user.", [node(), Request]),
partisan_pluggable_peer_service_manager:forward_message(From, {ok, Value});
false ->
partisan_logger:info("Received replies from: ~p, but need replies from: ~p", [Replies, Membership -- Replies]),
Expand Down
4 changes: 2 additions & 2 deletions protocols/alsberg_day_acked_membership.erl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ handle_info({collaborate_ack, ReplyingNode, {write, From, Key, Value}}, #state{o

Outstanding = case lists:usort(Membership) =:= lists:usort(Replies) of
true ->
partisan_logger:info("Node ~p received all replies for request ~p, acknowleding to user.", [node(), Request]),
partisan_logger:info("Node ~p received all replies for request ~p, acknowledging to user.", [node(), Request]),
partisan_pluggable_peer_service_manager:forward_message(From, {ok, Value}),
dict:erase(Request, Outstanding0);
false ->
Expand Down Expand Up @@ -393,7 +393,7 @@ handle_info({retry_collaborate_ack, ReplyingNode, {write, From, Key, Value}}, #s

case lists:usort(Membership) =:= lists:usort(Replies) of
true ->
partisan_logger:info("Node ~p received all replies for request ~p, acknowleding to user.", [node(), Request]),
partisan_logger:info("Node ~p received all replies for request ~p, acknowledging to user.", [node(), Request]),
partisan_pluggable_peer_service_manager:forward_message(From, {ok, Value});
false ->
partisan_logger:info("Received replies from: ~p, but need replies from: ~p", [lists:usort(Replies), Membership -- Replies]),
Expand Down
4 changes: 2 additions & 2 deletions src/partisan_analysis.erl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ partisan_analysis(Tree) ->

%% Run a forward interprocedural analysis beginning from the receive points
%% to establish the causal relationships between messages.
io:format("Performing interprocedural analysis from receieve points.~n", []),
io:format("Performing interprocedural analysis from receive points.~n", []),
MessageEntryPoints = [{handle_info,2},{handle_call,3},{handle_cast,2}],
FinalResults = lists:foldl(fun(EntryPoint, Acc) ->
case dict:find(EntryPoint, NamesToFunctions) of
Expand Down Expand Up @@ -1027,7 +1027,7 @@ generate_names_to_functions(StartFun) ->
case length(Anns) >= 3 of
true ->
%% Variable that represents the usage of a function in a function body.
% io:format("***** ignoring variable as it's a body occurence ~p~n", [N]),
% io:format("***** ignoring variable as it's a body occurrence ~p~n", [N]),
{N2Fs, CandidateTree, CandidateLabel, CandidateAnns};
false ->
%% Match!
Expand Down
6 changes: 3 additions & 3 deletions src/partisan_causality_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ handle_call({emit, Node, ServerRef, Message},
%% Return the message to be transmitted.
CausalMessage = {causal, Label, Node, ServerRef, FilteredOrderBuffer, LocalClock, Message},

%% Update the order buffer with node and mesage clock.
%% Update the order buffer with node and message clock.
OrderBuffer = orddict:store(Node, LocalClock, OrderBuffer0),

%% Everytime we omit a message, store the clock and message so we can regenerate the message.
%% Every time we omit a message, store the clock and message so we can regenerate the message.
true = ets:insert(Storage, {LocalClock, CausalMessage}),

lager:info("Emitting message with clock: ~p", [LocalClock]),

{reply, {ok, LocalClock, CausalMessage}, State#state{local_clock=LocalClock, order_buffer=OrderBuffer}};

%% Receive a causal messag off the wire; deliver or not depending on whether or not
%% Receive a causal message off the wire; deliver or not depending on whether or not
%% the causal dependencies have been satisfied.
handle_call({receive_message, {causal, Label, _Node, _ServerRef, _IncomingOrderBuffer, MessageClock, _Message}=FullMessage},
_From,
Expand Down
2 changes: 1 addition & 1 deletion src/partisan_gen.erl
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ reply({To, Tag}, Reply) ->
try To ! Msg catch _:_ -> Msg end.

%%-----------------------------------------------------------------
%% Syncronously stop a generic process
%% Synchronously stop a generic process
%%-----------------------------------------------------------------
stop(Process) ->
stop(Process, normal, infinity).
Expand Down
2 changes: 1 addition & 1 deletion src/partisan_gen_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ do_multi_call(Nodes, Name, Req, Timeout) ->
spawn(
fun() ->
%% Middleman process. Should be unsensitive to regular
%% exit signals. The sychronization is needed in case
%% exit signals. The synchronization is needed in case
%% the receiver would exit before the caller started
%% the monitor.
process_flag(trap_exit, true),
Expand Down
2 changes: 1 addition & 1 deletion src/partisan_hbbft_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ handle_call({sync, Target}, _From, #state{blocks = Blocks} = State) ->
{reply, ok, State};
_ ->
%% todo check for disjoint chain if there is ever a
%% possiblity of bad sync (I don't think there is right now)
%% possibility of bad sync (I don't think there is right now)
{ok, FetchedBlocks} = fetch_from(Target, hd(Blocks)),
Blocks1 = lists:append(FetchedBlocks, Blocks),
{reply, ok, State#state{blocks = Blocks1}}
Expand Down
6 changes: 3 additions & 3 deletions src/partisan_hyparview_peer_service_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ forward_message(Name, _Channel, ServerRef, Message, Options) ->

%% @doc Receive message from a remote manager.
receive_message(Peer, {forward_message, ServerRef, Message} = FullMessage) ->
% lager:info("in mesage receive at node ~p for peer ~p", [node(), Peer]),
% lager:info("in message receive at node ~p for peer ~p", [node(), Peer]),

case partisan_config:get(disable_fast_receive, true) of
true ->
% lager:info("in mesage receive at node ~p for peer ~p FAST RECEIVE DISABLE", [node(), Peer]),
% lager:info("in message receive at node ~p for peer ~p FAST RECEIVE DISABLE", [node(), Peer]),
gen_server:call(?MODULE, {receive_message, Peer, FullMessage}, infinity);
false ->
% lager:info("in mesage receive at node ~p for peer ~p FAST RECEIVE NOT DISABLE", [node(), Peer]),
% lager:info("in message receive at node ~p for peer ~p FAST RECEIVE NOT DISABLE", [node(), Peer]),
partisan_util:process_forward(ServerRef, Message)
end;
receive_message(Peer, Message) ->
Expand Down
4 changes: 2 additions & 2 deletions src/partisan_hyparview_xbot_peer_service_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ process_candidate([OldNode | RestActiveNodes], CandidateNode, #state{myself=Init
IsBetter = is_better(?XPARAM, CandidateNode, OldNode),
if IsBetter ->
NodeConnections = partisan_util:maybe_connect(CandidateNode, Connections),
% if cadidate is better that first node in active view, send optimization message
% if candidate is better that first node in active view, send optimization message
do_send_message(CandidateNode,{optimization, undefined, OldNode, InitiatorNode, CandidateNode, undefined},NodeConnections),
lager:debug("XBOT: Optimization message sent to Node ~p from ~p", [CandidateName, InitiatorName]);
true ->
Expand Down Expand Up @@ -1172,7 +1172,7 @@ handle_message({optimization_reply, true, _, InitiatorNode, CandidateNode, undef
#{name := InitiatorName} = InitiatorNode,
#{name := CandidateName} = CandidateNode,
lager:debug("XBOT: Received optimization reply message at Node ~p from ~p", [InitiatorName, CandidateName]),
%% Revise this behaviour, when candidate accepts inmediatly because it has availability in his active view
%% Revise this behaviour, when candidate accepts immediately because it has availability in his active view
%% what to do with old node?? we cannot disconnect from it because maybe it will be isolated
%Check = is_in_active_view(OldNode, Active),
%if Check ->
Expand Down
4 changes: 2 additions & 2 deletions src/partisan_orchestration_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ handle_info(?REFRESH_MESSAGE, #orchestration_strategy_state{orchestration_strate
{client, partisan_hyparview_peer_service_manager} ->
%% If we're the server, and we're in HyParView, clients will
%% ask the server to join the overlay and force outbound
%% conenctions to the clients.
%% connections to the clients.
Servers;
{server, partisan_hyparview_peer_service_manager} ->
%% If we're in HyParView, and we're a client, only ever
Expand All @@ -281,7 +281,7 @@ handle_info(?REFRESH_MESSAGE, #orchestration_strategy_state{orchestration_strate
{client, partisan_hyparview_xbot_peer_service_manager} ->
%% If we're the server, and we're in HyParView, clients will
%% ask the server to join the overlay and force outbound
%% conenctions to the clients.
%% connections to the clients.
Servers;
{server, partisan_hyparview_xbot_peer_service_manager} ->
%% If we're in HyParView, and we're a client, only ever
Expand Down
4 changes: 2 additions & 2 deletions src/partisan_peer_service_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ handle_cast(Req, State) ->
handle_info({Tag, _RawSocket, Data}, State=#state{socket=Socket}) when ?DATA_MSG(Tag) ->
case partisan_config:get(tracing, ?TRACING) of
true ->
lager:info("Recevied data from socket: ~p", [decode(Data)]);
lager:info("Received data from socket: ~p", [decode(Data)]);
false ->
ok
end,
Expand Down Expand Up @@ -134,7 +134,7 @@ handle_message({hello, Node},
%% control messaging in the test suite execution.
case maybe_connect_disterl(Node) of
ok ->
%% Send our state to the remote service, incase they want
%% Send our state to the remote service, in case they want
%% it to bootstrap.
Manager = partisan_peer_service:manager(),
{ok, LocalState} = Manager:get_local_state(),
Expand Down
8 changes: 4 additions & 4 deletions src/partisan_pluggable_peer_service_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ receive_message(Peer, {forward_message, ServerRef, {'$partisan_padded', _Padding
receive_message(_Peer, {forward_message, _ServerRef, {causal, Label, _, _, _, _, _} = Message}) ->
partisan_causality_backend:receive_message(Label, Message);
receive_message(Peer, {forward_message, ServerRef, Message} = FullMessage) ->
% lager:info("in mesage receive at node ~p for peer ~p: ~p", [node(), Peer, FullMessage]),
% lager:info("in message receive at node ~p for peer ~p: ~p", [node(), Peer, FullMessage]),

case partisan_config:get(disable_fast_receive, false) of
true ->
% lager:info("in mesage receive at node ~p for peer ~p FAST RECEIVE DISABLE: ~p", [node(), Peer, Message]),
% lager:info("in message receive at node ~p for peer ~p FAST RECEIVE DISABLE: ~p", [node(), Peer, Message]),
gen_server:call(?MODULE, {receive_message, Peer, FullMessage}, infinity);
false ->
% lager:info("in mesage receive at node ~p for peer ~p FAST RECEIVE NOT DISABLE", [node(), Peer]),
% lager:info("in message receive at node ~p for peer ~p FAST RECEIVE NOT DISABLE", [node(), Peer]),
partisan_util:process_forward(ServerRef, Message)
end;
receive_message(Peer, Message) ->
Expand Down Expand Up @@ -715,7 +715,7 @@ handle_cast({forward_message, From, Name, Channel, Clock, PartitionKey, ServerRe
%% We don't have a clock yet, get one using the causality backend.
{ok, LocalClock0, CausalMessage} = partisan_causality_backend:emit(CausalLabel, Name, ServerRef, Message),

%% Wrap the clock wih a scope.
%% Wrap the clock with a scope.
%% TODO: Maybe do this wrapping inside of the causality backend.
LocalClock = {CausalLabel, LocalClock0},

Expand Down
8 changes: 4 additions & 4 deletions src/partisan_plumtree_broadcast.erl
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,22 @@
%% A mapping of sender node (root of each broadcast tree)
%% to this node's portion of the tree. Elements are
%% added to this structure as messages rooted at a node
%% propogate to this node. Nodes that are never the
%% propagate to this node. Nodes that are never the
%% root of a message will never have a key added to
%% `eager_sets'
eager_sets :: [{nodename(), ordsets:ordset(nodename())}] | undefined,

%% A Mapping of sender node (root of each spanning tree)
%% to this node's set of lazy peers. Elements are added
%% to this structure as messages rooted at a node
%% propogate to this node. Nodes that are never the root
%% propagate to this node. Nodes that are never the root
%% of a message will never have a key added to `lazy_sets'
lazy_sets :: [{nodename(), ordsets:ordset(nodename())}] | undefined,

%% Lazy messages that have not been acked. Messages are added to
%% this set when a node is sent a lazy message (or when it should be
%% sent one sometime in the future). Messages are removed when the lazy
%% pushes are acknowleged via graft or ignores. Entries are keyed by their
%% pushes are acknowledged via graft or ignores. Entries are keyed by their
%% destination
outstanding :: [{nodename(), outstanding()}],

Expand Down Expand Up @@ -120,7 +120,7 @@
%% sets are empty. If there are two nodes, each will be in the others eager set and the
%% lazy sets will be empty. When number of members is less than 5, each node will initially
%% have one other node in its eager set and lazy set. If there are more than five nodes
%% each node will have at most two other nodes in its eager set and one in its lazy set, initally.
%% each node will have at most two other nodes in its eager set and one in its lazy set, initially.
%% In addition, after the broadcast server is started, a callback is registered with ring_events
%% to generate membership updates as the ring changes.
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.
Expand Down
2 changes: 1 addition & 1 deletion src/partisan_scamp_v1_membership_strategy.erl
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ periodic(#scamp_v1{last_message_time=LastMessageTime} = State) ->
%% Node is isolated.
case partisan_config:get(tracing, ?TRACING) of
true ->
lager:info("~p: Node is possibily isolated.", [node()]);
lager:info("~p: Node is possibly isolated.", [node()]);
false ->
ok
end,
Expand Down
2 changes: 1 addition & 1 deletion src/partisan_scamp_v2_membership_strategy.erl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ periodic(#scamp_v2{partial_view=PartialView, last_message_time=LastMessageTime}=
%% Node is isolated.
case partisan_config:get(tracing, ?TRACING) of
true ->
lager:info("~p: Node is possibily isolated.", [node()]);
lager:info("~p: Node is possibly isolated.", [node()]);
false ->
ok
end,
Expand Down
2 changes: 1 addition & 1 deletion src/partisan_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ registered_name(Name) ->
process_forward(ServerRef, Message) ->
case partisan_config:get(tracing, ?TRACING) of
true ->
lager:info("node ~p recieved message ~p for ~p", [node(), Message, ServerRef]);
lager:info("node ~p received message ~p for ~p", [node(), Message, ServerRef]);
false ->
ok
end,
Expand Down
2 changes: 1 addition & 1 deletion src/partisan_vclock.erl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ equal(VA, VB) ->
sort(Clock) ->
lists:sort(Clock).

%% @doc an effecient format for disk / wire.
%% @doc an efficient format for disk / wire.
%5 @see from_binary/1
-spec to_binary(vclock()) -> binary_vclock().
to_binary(Clock) ->
Expand Down
Loading

0 comments on commit 0a8bf8d

Please sign in to comment.