Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 src/Orleans.Core/GrainDirectory/IDhtGrainDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Orleans.GrainDirectory
/// <summary>
/// Recursive distributed operations on grain directories.
/// Each operation may forward the request to a remote owner, increasing the hopCount.
///
///
/// The methods here can be called remotely (where extended by IRemoteGrainDirectory) or
/// locally (where extended by ILocalGrainDirectory)
/// </summary>
Expand Down Expand Up @@ -88,7 +88,7 @@ internal readonly struct AddressAndTag
/// </summary>
[Id(0)]
public readonly GrainAddress? Address;

/// <summary>
/// The version of this entry.
/// </summary>
Expand Down
12 changes: 6 additions & 6 deletions src/Orleans.EventSourcing/LogStorage/LogViewAdaptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace Orleans.EventSourcing.LogStorage
/// A log view adaptor that wraps around a traditional storage adaptor, and uses batching and e-tags
/// to append entries.
///<para>
/// The log itself is transient, i.e. not actually saved to storage - only the latest view and some
/// metadata (the log position, and write flags) are stored.
/// The log itself is transient, i.e. not actually saved to storage - only the latest view and some
/// metadata (the log position, and write flags) are stored.
/// </para>
/// </summary>
/// <typeparam name="TLogView">Type of log view</typeparam>
Expand Down Expand Up @@ -249,7 +249,7 @@ public override string ToString()
/// </summary>
[Serializable]
[GenerateSerializer]
protected internal sealed class UpdateNotificationMessage : INotificationMessage
protected internal sealed class UpdateNotificationMessage : INotificationMessage
{
/// <inheritdoc/>
[Id(0)]
Expand Down Expand Up @@ -326,10 +326,10 @@ protected override void ProcessNotifications()
var updateNotification = notifications.ElementAt(0).Value;
notifications.RemoveAt(0);

// append all operations in pending
// append all operations in pending
foreach (var u in updateNotification.Updates)
GlobalLog.StateAndMetaData.Log.Add(u);

GlobalLog.StateAndMetaData.FlipBit(updateNotification.Origin);

GlobalLog.ETag = updateNotification.ETag;
Expand All @@ -342,7 +342,7 @@ protected override void ProcessNotifications()
Services.Log(LogLevel.Trace, "unprocessed notifications in queue: {0}", notifications.Count);

base.ProcessNotifications();

}


Expand Down
12 changes: 6 additions & 6 deletions src/Orleans.EventSourcing/StateStorage/LogViewAdaptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace Orleans.EventSourcing.StateStorage
/// A log view adaptor that wraps around a traditional storage adaptor, and uses batching and e-tags
/// to append entries.
///<para>
/// The log itself is transient, i.e. not actually saved to storage - only the latest view and some
/// metadata (the log position, and write flags) are stored.
/// The log itself is transient, i.e. not actually saved to storage - only the latest view and some
/// metadata (the log position, and write flags) are stored.
/// </para>
/// </summary>
/// <typeparam name="TLogView">Type of log view</typeparam>
Expand Down Expand Up @@ -219,7 +219,7 @@ public override string ToString()
/// </summary>
[Serializable]
[GenerateSerializer]
protected internal sealed class UpdateNotificationMessage : INotificationMessage
protected internal sealed class UpdateNotificationMessage : INotificationMessage
{
/// <inheritdoc/>
[Id(0)]
Expand Down Expand Up @@ -296,7 +296,7 @@ protected override void ProcessNotifications()
var updateNotification = notifications.ElementAt(0).Value;
notifications.RemoveAt(0);

// Apply all operations in pending
// Apply all operations in pending
foreach (var u in updateNotification.Updates)
try
{
Expand All @@ -311,15 +311,15 @@ protected override void ProcessNotifications()

GlobalStateCache.StateAndMetaData.FlipBit(updateNotification.Origin);

GlobalStateCache.ETag = updateNotification.ETag;
GlobalStateCache.ETag = updateNotification.ETag;

Services.Log(LogLevel.Debug, "notification success ({0} updates) {1}", updateNotification.Updates.Count, GlobalStateCache);
}

Services.Log(LogLevel.Trace, "unprocessed notifications in queue: {0}", notifications.Count);

base.ProcessNotifications();

}


Expand Down
10 changes: 5 additions & 5 deletions test/DefaultCluster.Tests/EchoTaskGrainTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task EchoGrain_Echo()
public async Task EchoGrain_EchoError()
{
var grain = this.GrainFactory.GetGrain<IEchoTaskGrain>(Guid.NewGuid());

Task<string> promise = grain.EchoErrorAsync(expectedEchoError);
await promise.ContinueWith(t =>
{
Expand All @@ -69,7 +69,7 @@ await promise.ContinueWith(t =>
public async Task EchoGrain_Timeout_ContinueWith()
{
var grain = this.GrainFactory.GetGrain<IEchoTaskGrain>(Guid.NewGuid());

TimeSpan delay5 = TimeSpan.FromSeconds(30); // grain call timeout (set in config)
TimeSpan delay45 = TimeSpan.FromSeconds(45);
TimeSpan delay60 = TimeSpan.FromSeconds(60);
Expand All @@ -94,7 +94,7 @@ await promise.ContinueWith(
public async Task EchoGrain_Timeout_Await()
{
var grain = this.GrainFactory.GetGrain<IEchoTaskGrain>(Guid.NewGuid());

TimeSpan delay5 = TimeSpan.FromSeconds(5);
TimeSpan delay25 = TimeSpan.FromSeconds(25);
Stopwatch sw = new Stopwatch();
Expand All @@ -118,7 +118,7 @@ public async Task EchoGrain_Timeout_Await()
public async Task EchoGrain_Timeout_Result()
{
var grain = this.GrainFactory.GetGrain<IEchoTaskGrain>(Guid.NewGuid());

TimeSpan delay5 = TimeSpan.FromSeconds(5);
TimeSpan delay25 = TimeSpan.FromSeconds(25);
Stopwatch sw = new Stopwatch();
Expand Down Expand Up @@ -197,7 +197,7 @@ public async Task EchoGrain_Ping()

what = "EchoGrain.Ping";
clock.Restart();

await grain.PingAsync().WaitAsync(timeout);
this.Logger.LogInformation("{What} took {Elapsed}", what, clock.Elapsed);
}
Expand Down
6 changes: 3 additions & 3 deletions test/DefaultCluster.Tests/GenericGrainTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task GenericGrainTests_ConcreteGrainWithGenericInterfaceGetGrain()
Assert.Equal("789", stringResult);
}

/// Multiple GetGrain requests with the same id return the same concrete grain
/// Multiple GetGrain requests with the same id return the same concrete grain
[Fact]
public async Task GenericGrainTests_ConcreteGrainWithGenericInterfaceMultiplicity()
{
Expand Down Expand Up @@ -149,7 +149,7 @@ public async Task GenericGrainTests_SimpleGenericGrainMultiplicity()
Assert.Equal(1.2f, floatResult);
}

/// If both a concrete implementation and a generic implementation of a
/// If both a concrete implementation and a generic implementation of a
/// generic interface exist, prefer the concrete implementation.
[Fact]
public async Task GenericGrainTests_PreferConcreteGrainImplementationOfGenericInterface()
Expand Down Expand Up @@ -240,7 +240,7 @@ public async Task GenericGrainTests_ConcreteGrainWithMultipleGenericInterfacesMu
await grainRef1.Set(1);
await grainRef1.Transform(); // ConcreteGrainWith2GenericInterfaces multiplies the set value by 10:

// A second reference to a different interface implemented by ConcreteGrainWith2GenericInterfaces
// A second reference to a different interface implemented by ConcreteGrainWith2GenericInterfaces
// will reference the same grain:
var grainRef2 = GetGrain<IGenericGrain<int, string>>(grainId);
// ConcreteGrainWith2GenericInterfaces returns a string representation of the current value multiplied by 10:
Expand Down
4 changes: 2 additions & 2 deletions test/DefaultCluster.Tests/MultifacetGrainTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public async Task RWReferences()
{
writer = this.GrainFactory.GetGrain<IMultifacetWriter>(GetRandomGrainId());
reader = writer.AsReference<IMultifacetReader>();

int x = 1234;
await writer.SetValue(x).WaitAsync(timeout);
int y = await reader.GetValue();
Expand All @@ -50,7 +50,7 @@ public async Task MultifacetFactory()
await writer.SetValue(5);
int v = await reader.GetValue();
Assert.Equal(5, v);

}

[Fact, TestCategory("BVT"), TestCategory("Cast")]
Expand Down
2 changes: 1 addition & 1 deletion test/Grains/TestGrains/ProducerEventCountingGrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task SendEvent()
{
throw new ApplicationException("Not yet a producer on a stream. Must call BecomeProducer first.");
}

await _producer.OnNextAsync(_numProducedItems + 1);

// update after send in case of error
Expand Down
6 changes: 3 additions & 3 deletions test/Tester/EventSourcingTests/CountersGrainPerfTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using TestGrainInterfaces;
using TestGrainInterfaces;
using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;
Expand All @@ -22,9 +22,9 @@ public partial class CountersGrainTests
// what you should see is:
// - the conservative approach (confirm each update, disallow reentrancy) is slow.
// - confirming at end only, instead of after each update, is fast.
// - allowing reentrancy, while still confirming after each update, is also fast.
// - allowing reentrancy, while still confirming after each update, is also fast.

private readonly int iterations = 800;
private const int iterations = 800;

[Fact, RunThisFirst, TestCategory("EventSourcing")]
public Task Perf_Warmup()
Expand Down