Skip to content

Commit

Permalink
Merge pull request #33 from SphereEx/fix-5.5.1
Browse files Browse the repository at this point in the history
Update the default value of instance-connection-enabled to true
  • Loading branch information
jiangML authored Nov 1, 2024
2 parents 8324e65 + 720f93b commit 095708e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public enum TemporaryConfigurationPropertyKey implements TypedPropertyKey {
* Instance connection enabled.
*/
@SphereEx
INSTANCE_CONNECTION_ENABLED("instance-connection-enabled", String.valueOf(Boolean.FALSE), boolean.class, false),
INSTANCE_CONNECTION_ENABLED("instance-connection-enabled", String.valueOf(Boolean.TRUE), boolean.class, false),

@SphereEx
DROP_CURRENT_USER_ENABLED("drop-current-user-enabled", String.valueOf(Boolean.TRUE), boolean.class, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.shardingsphere.infra.config.database.impl.DataSourceGeneratedDatabaseConfiguration;
import org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationProperties;
import org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
import org.apache.shardingsphere.infra.database.core.metadata.database.DialectDatabaseMetaData;
Expand Down Expand Up @@ -156,8 +157,7 @@ private static MetaDataContexts createByLocal(final MetaDataPersistService persi
private static MetaDataContexts createByRepository(final MetaDataPersistService persistService, final ContextManagerBuilderParameter param,
final ComputeNodeInstanceContext computeNodeInstanceContext, @SphereEx final Map<String, QualifiedDataSourceState> statusMap) {
@SphereEx
boolean isInstanceConnectionEnabled = Boolean.parseBoolean(
String.valueOf(param.getProps().getOrDefault(TemporaryConfigurationPropertyKey.INSTANCE_CONNECTION_ENABLED.getKey(), Boolean.FALSE.toString())));
boolean isInstanceConnectionEnabled = new TemporaryConfigurationProperties(persistService.getPropsService().load()).getValue(TemporaryConfigurationPropertyKey.INSTANCE_CONNECTION_ENABLED);
@SphereEx(Type.MODIFY)
Map<String, DatabaseConfiguration> effectiveDatabaseConfigs =
createEffectiveDatabaseConfigurations(getDatabaseNames(persistService), param.getDatabaseConfigs(), persistService, isInstanceConnectionEnabled);
Expand Down

0 comments on commit 095708e

Please sign in to comment.