Skip to content

Instantly share code, notes, and snippets.

@seancribbs seancribbs/legacy.txt
Last active Aug 29, 2015

What would you like to do?
Places we refer to 'legacy' in riak_core
$ ack legacy src
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) ->
80: [proxy, legacy],
81: legacy,
83: legacy_vnode_routing,
84: [{true, legacy}, {false, proxy}]}),
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),
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
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 "
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
106: case riak_core_ring:legacy_reconcile(OtherRing, MyRing) of
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,
1407:% @spec legacy_reconcile(MyNodeName :: term(),
1410:legacy_reconcile(MyNodeName, StateA, StateB) ->
346: case riak_core_ring:legacy_ring(Ring) of
348: lager:info("Upgrading legacy ring"),
255:%% node is running in legacy mode. The forwarding state represents the case
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
You can’t perform that action at this time.