发布x.3.1.77修复动态添加从库bug
This commit is contained in:
parent
fe7275882d
commit
1d3f36b388
|
@ -1,9 +1,9 @@
|
||||||
:start
|
:start
|
||||||
::定义版本
|
::定义版本
|
||||||
set EFCORE2=2.3.1.76
|
set EFCORE2=2.3.1.77
|
||||||
set EFCORE3=3.3.1.76
|
set EFCORE3=3.3.1.77
|
||||||
set EFCORE5=5.3.1.76
|
set EFCORE5=5.3.1.77
|
||||||
set EFCORE6=6.3.1.76
|
set EFCORE6=6.3.1.77
|
||||||
|
|
||||||
::删除所有bin与obj下的文件
|
::删除所有bin与obj下的文件
|
||||||
@echo off
|
@echo off
|
||||||
|
|
|
@ -103,7 +103,9 @@ namespace ShardingCore.DIExtensions
|
||||||
public bool? IgnoreCreateTableError { get; set; } = true;
|
public bool? IgnoreCreateTableError { get; set; } = true;
|
||||||
public int MaxQueryConnectionsLimit { get; set; } = Environment.ProcessorCount;
|
public int MaxQueryConnectionsLimit { get; set; } = Environment.ProcessorCount;
|
||||||
public ConnectionModeEnum ConnectionMode { get; set; } = ConnectionModeEnum.SYSTEM_AUTO;
|
public ConnectionModeEnum ConnectionMode { get; set; } = ConnectionModeEnum.SYSTEM_AUTO;
|
||||||
|
[Obsolete]
|
||||||
public bool? EnableTableRouteCompileCache { get; set; }
|
public bool? EnableTableRouteCompileCache { get; set; }
|
||||||
|
[Obsolete]
|
||||||
public bool? EnableDataSourceRouteCompileCache { get; set; }
|
public bool? EnableDataSourceRouteCompileCache { get; set; }
|
||||||
|
|
||||||
private readonly ISet<Type> _createTableEntities = new HashSet<Type>();
|
private readonly ISet<Type> _createTableEntities = new HashSet<Type>();
|
||||||
|
|
|
@ -67,15 +67,6 @@ namespace ShardingCore.Extensions
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 移除所有的没有分片的表
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dbContext"></param>
|
|
||||||
[Obsolete($"plz use {nameof(RemoveDbContextAllRelationModelThatIsNoSharding)}")]
|
|
||||||
public static void RemoveDbContextAllRelationModelThatIsNoShardingTable(this DbContext dbContext)
|
|
||||||
{
|
|
||||||
RemoveDbContextAllRelationModelThatIsNoSharding(dbContext);
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 移除所有的没有分片的表
|
/// 移除所有的没有分片的表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -49,15 +49,20 @@ namespace ShardingCore.Sharding.ReadWriteConfigurations
|
||||||
if (_readWriteOptions.ReadStrategy == ReadStrategyEnum.Loop)
|
if (_readWriteOptions.ReadStrategy == ReadStrategyEnum.Loop)
|
||||||
{
|
{
|
||||||
connector= new ReadWriteLoopConnector(dataSourceName, new List<string> { connectionString });
|
connector= new ReadWriteLoopConnector(dataSourceName, new List<string> { connectionString });
|
||||||
|
_connectors.TryAdd(dataSourceName, connector);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (_readWriteOptions.ReadStrategy == ReadStrategyEnum.Random)
|
else if (_readWriteOptions.ReadStrategy == ReadStrategyEnum.Random)
|
||||||
{
|
{
|
||||||
connector= new ReadWriteLoopConnector(dataSourceName, new List<string> { connectionString });
|
connector= new ReadWriteRandomConnector(dataSourceName, new List<string> { connectionString });
|
||||||
|
_connectors.TryAdd(dataSourceName, connector);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
throw new ShardingCoreInvalidOperationException(
|
throw new ShardingCoreInvalidOperationException(
|
||||||
$"unknown read write strategy:[{_readWriteOptions.ReadStrategy}]");
|
$"unknown read write strategy:[{_readWriteOptions.ReadStrategy}]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<Version>$(EFCORE6)</Version>
|
<Version>$(EFCORE6)</Version>
|
||||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||||
<DefineConstants>TRACE;DEBUG;EFCORE6;</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;EFCORE6;</DefineConstants>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
|
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
|
||||||
<PackageIcon>logo.png</PackageIcon>
|
<PackageIcon>logo.png</PackageIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<Version>$(EFCORE2)</Version>
|
<Version>$(EFCORE2)</Version>
|
||||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||||
<DefineConstants>TRACE;DEBUG;EFCORE2;</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;EFCORE2;</DefineConstants>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
<AssemblyName>ShardingCore</AssemblyName>
|
<AssemblyName>ShardingCore</AssemblyName>
|
||||||
<RootNamespace>ShardingCore</RootNamespace>
|
<RootNamespace>ShardingCore</RootNamespace>
|
||||||
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
|
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<Version>$(EFCORE3)</Version>
|
<Version>$(EFCORE3)</Version>
|
||||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||||
<DefineConstants>TRACE;DEBUG;EFCORE3;</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;EFCORE3;</DefineConstants>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
<AssemblyName>ShardingCore</AssemblyName>
|
<AssemblyName>ShardingCore</AssemblyName>
|
||||||
<RootNamespace>ShardingCore</RootNamespace>
|
<RootNamespace>ShardingCore</RootNamespace>
|
||||||
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
|
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<Version>$(EFCORE5)</Version>
|
<Version>$(EFCORE5)</Version>
|
||||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||||
<DefineConstants>TRACE;DEBUG;EFCORE5;</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;EFCORE5;</DefineConstants>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
<AssemblyName>ShardingCore</AssemblyName>
|
<AssemblyName>ShardingCore</AssemblyName>
|
||||||
<RootNamespace>ShardingCore</RootNamespace>
|
<RootNamespace>ShardingCore</RootNamespace>
|
||||||
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
|
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
|
||||||
|
|
Loading…
Reference in New Issue