-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: master
Are you sure you want to change the base?
Changes from 5 commits
88a2474
a036549
744c714
c901201
96b3eef
b16bb7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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> | ||
</PropertyGroup> | ||
|
||
</Project> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"sdk": { | ||
"version": "2.1.302" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
|
||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Options; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; | ||
|
||
|
@@ -65,4 +65,4 @@ public static IServiceCollection UseCassandraGatewayListProvider( | |
return services.AddSingleton<IGatewayListProvider, CassandraGatewayListProvider>(); | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,31 @@ public async Task DeleteMembershipTableEntries(string clusterId) | |
} | ||
} | ||
|
||
public async Task CleanupDefunctSiloEntries(DateTimeOffset beforeDate) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method has been introduced in https://github.com/dotnet/orleans/blob/v2.3.0/src/Orleans.Core/SystemTargetInterfaces/IMembershipTable.cs#L30 |
||
{ | ||
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Myakotka 2