Skip to content

Instantly share code, notes, and snippets.

@seancribbs
Last active August 29, 2015 13:56
Show Gist options
  • Save seancribbs/9145331 to your computer and use it in GitHub Desktop.
Save seancribbs/9145331 to your computer and use it in GitHub Desktop.
Places we refer to 'legacy' in riak_core
$ ack legacy src
src/riak_core.erl
75: join(riak_core_gossip:legacy_gossip(), node(), Node, false, Auto).
78: legacy_join(Node);
85: %% doesn't define legacy_gossip will be handled
86: %% in standard_join based on seeing a legacy ring.
93: case riak_core_ring:legacy_ring(Ring) of
108: case riak_core_ring:legacy_ring(Ring) of
110: legacy_join(Node);
153:legacy_join(Node) when is_atom(Node) ->
src/riak_core_app.erl
80: [proxy, legacy],
81: legacy,
83: legacy_vnode_routing,
84: [{true, legacy}, {false, proxy}]}),
src/riak_core_capability.erl
98: legacy}).
120:%% default mode, and an optional mapping of how a legacy application variable
187:%% the default mode, and a mapping from a legacy var to it's capabilities.
257: #capability{supported=Supported, default=Default, legacy=Legacy}.
575:%% Determine capabilities of legacy nodes based on app.config settings and
586: Info#capability.legacy),
src/riak_core_claim.erl
120: case riak_core_ring:legacy_ring(Ring) of
128: case riak_core_ring:legacy_ring(Ring) of
141: case riak_core_ring:legacy_ring(Ring) of
src/riak_core_console.erl
44: print_member_status(Ring, legacy_gossip(Ring)).
46:legacy_gossip(Ring) ->
49: [{Node, riak_core_gossip:legacy_gossip(Node)} || Node <- Members],
64: true -> "(legacy)";
598: {error, legacy} ->
599: io:format("The cluster is running in legacy mode and does not "
740: {error, legacy} ->
741: io:format("The cluster is running in legacy mode and does not "
src/riak_core_gossip.erl
42: gossip_version/0, legacy_gossip/0, legacy_gossip/1,
43: any_legacy_gossip/2]).
83:legacy_gossip() ->
86:legacy_gossip(_Node) ->
89:%% @doc Determine if any of the `Nodes' are using legacy gossip by querying
91:%% for legacy gossip is to use {@link legacy_gossip/1}. This function
93:any_legacy_gossip(_Ring, _Nodes) ->
164:check_legacy_gossip(_Ring, _State) ->
172: %% Ring owner defaults to legacy gossip if unspecified.
253: Legacy = check_legacy_gossip(Ring, State),
295: %% Due to rolling upgrades and legacy gossip, a ring's cluster name
src/riak_core_gossip_legacy.erl
32:-module(riak_core_gossip_legacy).
106: case riak_core_ring:legacy_reconcile(OtherRing, MyRing) of
src/riak_core_ring.erl
58: legacy_ring/1,
59: legacy_reconcile/2,
192:%% @doc Returns true if the given ring is a legacy ring.
193:legacy_ring(#chstate{}) ->
195:legacy_ring(_) ->
1356:legacy_reconcile(ExternState, MyState) ->
1377: case legacy_equal_rings(ExternState,MyState) of
1380: legacy_reconcile(MyState#chstate.nodename,
1395:legacy_equal_rings(_A=#chstate{chring=RA,meta=MA},
1407:% @spec legacy_reconcile(MyNodeName :: term(),
1410:legacy_reconcile(MyNodeName, StateA, StateB) ->
src/riak_core_ring_manager.erl
346: case riak_core_ring:legacy_ring(Ring) of
348: lager:info("Upgrading legacy ring"),
src/riak_core_vnode.erl
255:%% node is running in legacy mode. The forwarding state represents the case
src/riak_core_vnode_master.erl
39:-record(state, {idxtab, sup_name, vnode_mod, legacy}).
121: case riak_core_capability:get({riak_core, vnode_routing}, legacy) of
122: legacy ->
157:%% Make a request record - exported for use by legacy modules
165:%% Make a request record - exported for use by legacy modules
187: legacy=LegacyMod}}.
193: case riak_core_capability:get({riak_core, vnode_routing}, legacy) of
194: legacy ->
237:handle_cast(Other, State=#state{legacy=Legacy}) when Legacy =/= undefined ->
263:handle_call(Other, From, State=#state{legacy=Legacy}) when Legacy =/= undefined ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment