diff --git a/old-bin/counterexample-model-checker.escript b/old-bin/counterexample-model-checker.escript index 9e62b9a5..f74672bd 100644 --- a/old-bin/counterexample-model-checker.escript +++ b/old-bin/counterexample-model-checker.escript @@ -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 @@ -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]), diff --git a/protocols/alsberg_day.erl b/protocols/alsberg_day.erl index fe24fd3b..67715aed 100644 --- a/protocols/alsberg_day.erl +++ b/protocols/alsberg_day.erl @@ -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]), diff --git a/protocols/alsberg_day_acked.erl b/protocols/alsberg_day_acked.erl index 1479cae9..cbc25c4e 100644 --- a/protocols/alsberg_day_acked.erl +++ b/protocols/alsberg_day_acked.erl @@ -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 -> @@ -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]), diff --git a/protocols/alsberg_day_acked_membership.erl b/protocols/alsberg_day_acked_membership.erl index bd1e2de2..8ef4ebb6 100644 --- a/protocols/alsberg_day_acked_membership.erl +++ b/protocols/alsberg_day_acked_membership.erl @@ -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 -> @@ -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]), diff --git a/src/partisan_analysis.erl b/src/partisan_analysis.erl index 055c3ef9..7315cac8 100644 --- a/src/partisan_analysis.erl +++ b/src/partisan_analysis.erl @@ -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 @@ -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! diff --git a/src/partisan_causality_backend.erl b/src/partisan_causality_backend.erl index 01751f50..d26b424e 100644 --- a/src/partisan_causality_backend.erl +++ b/src/partisan_causality_backend.erl @@ -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, diff --git a/src/partisan_gen.erl b/src/partisan_gen.erl index 008693f7..7cd08eb0 100644 --- a/src/partisan_gen.erl +++ b/src/partisan_gen.erl @@ -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). diff --git a/src/partisan_gen_server.erl b/src/partisan_gen_server.erl index b01f8fb7..d121fd64 100644 --- a/src/partisan_gen_server.erl +++ b/src/partisan_gen_server.erl @@ -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), diff --git a/src/partisan_hbbft_worker.erl b/src/partisan_hbbft_worker.erl index e5da67d0..a1b71980 100644 --- a/src/partisan_hbbft_worker.erl +++ b/src/partisan_hbbft_worker.erl @@ -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}} diff --git a/src/partisan_hyparview_peer_service_manager.erl b/src/partisan_hyparview_peer_service_manager.erl index dd5515db..3ef7b5cf 100644 --- a/src/partisan_hyparview_peer_service_manager.erl +++ b/src/partisan_hyparview_peer_service_manager.erl @@ -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) -> diff --git a/src/partisan_hyparview_xbot_peer_service_manager.erl b/src/partisan_hyparview_xbot_peer_service_manager.erl index e7470cc1..2419d0e6 100644 --- a/src/partisan_hyparview_xbot_peer_service_manager.erl +++ b/src/partisan_hyparview_xbot_peer_service_manager.erl @@ -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 -> @@ -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 -> diff --git a/src/partisan_orchestration_backend.erl b/src/partisan_orchestration_backend.erl index 5cf6eeeb..6aa2f1bb 100644 --- a/src/partisan_orchestration_backend.erl +++ b/src/partisan_orchestration_backend.erl @@ -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 @@ -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 diff --git a/src/partisan_peer_service_server.erl b/src/partisan_peer_service_server.erl index e9d555a9..8c3b3fb0 100644 --- a/src/partisan_peer_service_server.erl +++ b/src/partisan_peer_service_server.erl @@ -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, @@ -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(), diff --git a/src/partisan_pluggable_peer_service_manager.erl b/src/partisan_pluggable_peer_service_manager.erl index 11ad709b..8873ec46 100644 --- a/src/partisan_pluggable_peer_service_manager.erl +++ b/src/partisan_pluggable_peer_service_manager.erl @@ -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) -> @@ -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}, diff --git a/src/partisan_plumtree_broadcast.erl b/src/partisan_plumtree_broadcast.erl index 368a9351..039c02be 100644 --- a/src/partisan_plumtree_broadcast.erl +++ b/src/partisan_plumtree_broadcast.erl @@ -71,7 +71,7 @@ %% 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, @@ -79,14 +79,14 @@ %% 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()}], @@ -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()}. diff --git a/src/partisan_scamp_v1_membership_strategy.erl b/src/partisan_scamp_v1_membership_strategy.erl index 61ac8e1e..daf8a8c3 100644 --- a/src/partisan_scamp_v1_membership_strategy.erl +++ b/src/partisan_scamp_v1_membership_strategy.erl @@ -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, diff --git a/src/partisan_scamp_v2_membership_strategy.erl b/src/partisan_scamp_v2_membership_strategy.erl index ddb4bc83..ca618d08 100644 --- a/src/partisan_scamp_v2_membership_strategy.erl +++ b/src/partisan_scamp_v2_membership_strategy.erl @@ -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, diff --git a/src/partisan_util.erl b/src/partisan_util.erl index 32f5e59f..2d15a412 100644 --- a/src/partisan_util.erl +++ b/src/partisan_util.erl @@ -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, diff --git a/src/partisan_vclock.erl b/src/partisan_vclock.erl index e52a64c5..6d92fc79 100644 --- a/src/partisan_vclock.erl +++ b/src/partisan_vclock.erl @@ -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) -> diff --git a/test/filibuster_SUITE.erl b/test/filibuster_SUITE.erl index eb234fee..00f65bee 100644 --- a/test/filibuster_SUITE.erl +++ b/test/filibuster_SUITE.erl @@ -751,7 +751,7 @@ analyze(StartTime, Nodes, Counterexample, Pass, NumPassed0, NumFailed0, NumPrune %% 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 @@ -1353,7 +1353,7 @@ execute_schedule(StartTime, CurrentIteration, Nodes, Counterexample, PreloadOmis false -> %% This failed. debug("Test FAILED!~n", []), - % debug("Failing test contained the following omitted mesage types: ~p~n", [Omissions]), + % debug("Failing test contained the following omitted message types: ~p~n", [Omissions]), OmissionTypes = message_types(Omissions), debug("=> OmissionTypes: ~p~n", [OmissionTypes]), @@ -1597,7 +1597,7 @@ verify_annotations(CausalityAnnotations, MessageTypesFromTraceLines) -> true -> debug("=> has the following requirements: ~p", [Requirements]), - %% Find first occurence of the message in the trace. + %% Find first occurrence of the message in the trace. Nth = index_of(MessageType, MessageTypesFromTraceLines), debug("=> ~p is index: ~p", [MessageType, Nth]), @@ -1619,7 +1619,7 @@ verify_annotations(CausalityAnnotations, MessageTypesFromTraceLines) -> case Criteria of N when N =< length(CriteriaMessages) -> - %% Weakest precondition candidiate. + %% Weakest precondition candidate. debug(" -> criteria, MET!", []), Acc1; _ -> diff --git a/test/partisan_SUITE.erl b/test/partisan_SUITE.erl index 6387ceec..5230174b 100644 --- a/test/partisan_SUITE.erl +++ b/test/partisan_SUITE.erl @@ -2056,7 +2056,7 @@ hyparview_membership_check(Nodes) -> {ok, ActiveSet} = rpc:call(Node, Manager, active, []), Active = sets:to_list(ActiveSet), - %% Add vertexes and edges. + %% Add vertices and edges. [?SUPPORT:connect(Graph, Node, N) || #{name := N} <- Active] end, %% Build a digraph representing the membership @@ -2284,7 +2284,7 @@ hyparview_xbot_membership_check(Nodes) -> {ok, ActiveSet} = rpc:call(Node, Manager, active, []), Active = sets:to_list(ActiveSet), - %% Add vertexes and edges. + %% Add vertices and edges. [?SUPPORT:connect(Graph, Node, N) || #{name := N} <- Active] end, %% Build a digraph representing the membership