Skip to content

Commit

Permalink
Merge branch 'windkit-issue_914' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
yosukehara committed Nov 6, 2017
2 parents 19a3f5e + dc1f84a commit aadb345
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/leo_manager/include/leo_manager.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@
-define(ERROR_FAIL_TO_UPDATE_ACL, "Fail to update acl of a bucket").
-define(ERROR_FAIL_ACCESS_MNESIA, "Fail to access mnesia").
-define(ERROR_ALREADY_HAS_SAME_CLUSTER, "Already has a same neme of cluster").
-define(ERROR_INCOMPATIBLE_VERSION, "Incompatible Version").
-define(ERROR_COULD_NOT_GET_CLUSTER_INFO,"Could not get cluster info").
-define(ERROR_OVER_MAX_CLUSTERS, "Over max number of clusters").
-define(ERROR_CLUSTER_NOT_FOUND, "Cluster not found").
Expand Down
9 changes: 8 additions & 1 deletion apps/leo_manager/src/leo_manager_api.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2408,6 +2408,9 @@ call_gateway_api(Method, Args) ->
%% @doc Join a cluster (MDC-Replication)
-spec(join_cluster([atom()], #?SYSTEM_CONF{}) ->
{ok, #?SYSTEM_CONF{}} | {error, any()}).
%% @doc Convert System Conf from ~1.3.2 cluster
join_cluster(RemoteManagerNodes, #system_conf_2{} = SystemConf) ->
join_cluster(RemoteManagerNodes, leo_cluster_tbl_conf:transform(SystemConf));
join_cluster(RemoteManagerNodes,
#?SYSTEM_CONF{cluster_id = ClusterId,
dc_id = DCId,
Expand Down Expand Up @@ -2439,7 +2442,11 @@ join_cluster(RemoteManagerNodes,
{error, ?ERROR_ALREADY_HAS_SAME_CLUSTER};
Error ->
Error
end.
end;
join_cluster(RemoteManagerNodes, _) ->
?error("join_cluster/2", [{cause, ?ERROR_INCOMPATIBLE_VERSION},
{nodes, RemoteManagerNodes}]),
{error, ?ERROR_INCOMPATIBLE_VERSION}.


%% @doc Synchronize mdc-related tables
Expand Down

0 comments on commit aadb345

Please sign in to comment.