mv subenv & idc check for ClusterDatabaseSetAdapter
@@ -55,7 +55,7 @@ public class ClusterDatabaseSetAdapter implements DatabaseSetAdapter {
* 4. no idgen config
* 5. one master, no slaves
*/
- boolean adaptable = checkEnv();
+ boolean adaptable = true;
if (defaultDatabaseSet.getDatabaseCategory() != DatabaseCategory.MySql)
adaptable = false;
if (defaultDatabaseSet.getShardingStrategy() != null)
@@ -71,12 +71,6 @@ public class ClusterDatabaseSetAdapter implements DatabaseSetAdapter {
return adaptable;
}
- private boolean checkEnv() {
- String subEnv = envUtils.getSubEnv();
- String idc = envUtils.getIdc();
- return StringUtils.isEmpty(subEnv) && (idc == null || !idc.toLowerCase().contains("aws"));
- }
-
private ClusterDatabaseSet tryAdapt(DefaultDatabaseSet defaultDatabaseSet) {
try {
List<DataBase> masters = defaultDatabaseSet.getMasterDbs();
