Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update packages #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<OrleansPackageVersion Condition=" '$(OrleansPackageVersion)'=='' ">2.0*</OrleansPackageVersion>
<OrleansPackageVersion Condition=" '$(OrleansPackageVersion)'=='' ">2.3.*</OrleansPackageVersion>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Myakotka 2

</PropertyGroup>

</Project>
</Project>
1 change: 1 addition & 0 deletions NuClear.CodeStyle.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
Expand Down
24 changes: 17 additions & 7 deletions Orleans.Clustering.Cassandra.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orleans.Clustering.Cassandra", "src/Orleans.Clustering.Cassandra/Orleans.Clustering.Cassandra.csproj", "{715DE586-77D5-48B1-AB5F-C3FE4E2FA1FD}"
# Visual Studio Version 16
VisualStudioVersion = 16.0.29025.244
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Orleans.Clustering.Cassandra", "src\Orleans.Clustering.Cassandra\Orleans.Clustering.Cassandra.csproj", "{715DE586-77D5-48B1-AB5F-C3FE4E2FA1FD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{91B10093-470D-4C12-A7A6-E1388E89937E}"
ProjectSection(SolutionItems) = preProject
build\build.ps1 = build\build.ps1
build\build.cmd = build\build.cmd
appveyor.yml = appveyor.yml
Directory.Build.props = Directory.Build.props
EndProjectSection
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
build\build.cmd = build\build.cmd
build\build.ps1 = build\build.ps1
Directory.Build.props = Directory.Build.props
global.json = global.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -21,4 +25,10 @@ Global
{715DE586-77D5-48B1-AB5F-C3FE4E2FA1FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{715DE586-77D5-48B1-AB5F-C3FE4E2FA1FD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {695ED350-2363-49F5-B682-38A3FD4DCCA3}
EndGlobalSection
EndGlobal
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "2.1.302"
}
}
4 changes: 2 additions & 2 deletions src/Orleans.Clustering.Cassandra/ClusteringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Myakotka 1


using Orleans.Clustering.Cassandra.Membership;
using Orleans.Clustering.Cassandra.Options;
using Orleans.Configuration;
using Orleans.Hosting;
using Orleans.Messaging;

Expand Down Expand Up @@ -65,4 +65,4 @@ public static IServiceCollection UseCassandraGatewayListProvider(
return services.AddSingleton<IGatewayListProvider, CassandraGatewayListProvider>();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,31 @@ public async Task DeleteMembershipTableEntries(string clusterId)
}
}

public async Task CleanupDefunctSiloEntries(DateTimeOffset beforeDate)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
try
{
var data = await _dataTable
.Where(x => x.ClusterId == _clusterId && x.Timestamp < beforeDate && x.Status == (int)SiloStatus.Dead)
.AllowFiltering()
.SetConsistencyLevel(DefaultConsistencyLevel)
.ExecuteAsync();

var batch = _mapper.CreateBatch().WithOptions(x => x.SetConsistencyLevel(DefaultConsistencyLevel));
foreach (var item in data)
{
batch.Delete(item);
}

await _mapper.ExecuteAsync(batch);
}
catch (DriverException)
{
_logger.LogWarning("Cassandra driver error occured while cleaning up defunct Silo entries for cluster {clusterId}.", _clusterId);
throw;
}
}

public async Task<MembershipTableData> ReadRow(SiloAddress key)
{
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CassandraCSharpDriver" Version="3.6.0" />
<PackageReference Include="CassandraCSharpDriver" Version="3.10.1" />
<PackageReference Include="Microsoft.Orleans.Core" Version="$(OrleansPackageVersion)" />
<PackageReference Include="Microsoft.Orleans.Runtime.Abstractions" Version="$(OrleansPackageVersion)" />
</ItemGroup>
</Project>
</Project>