-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
83 changed files
with
6,533 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Orleans.LogConsistency | ||
{ | ||
|
||
/// <summary> | ||
/// Represents information about connection issues encountered inside log consistency protocols. | ||
/// It is used both inside the protocol to track retry loops, and is made visible to users | ||
/// who want to monitor their log-consistent grains for communication issues. | ||
/// </summary> | ||
[Serializable] | ||
public abstract class ConnectionIssue | ||
{ | ||
/// <summary> | ||
/// The UTC timestamp of the last time at which the issue was observed | ||
/// </summary> | ||
public DateTime TimeStamp { get; set; } | ||
|
||
/// <summary> | ||
/// The UTC timestamp of the first time we observed this issue | ||
/// </summary> | ||
public DateTime TimeOfFirstFailure { get; set; } | ||
|
||
/// <summary> | ||
/// The number of times we have observed this issue since the first failure | ||
/// </summary> | ||
public int NumberOfConsecutiveFailures { get; set; } | ||
|
||
/// <summary> | ||
/// The delay we are waiting before the next retry | ||
/// </summary> | ||
public TimeSpan RetryDelay { get; set; } | ||
|
||
/// <summary> | ||
/// Computes the retry delay based on the rest of the information. Is overridden by subclasses | ||
/// that represent specific categories of issues. | ||
/// </summary> | ||
/// <param name="previous">The previously used retry delay</param> | ||
/// <returns></returns> | ||
public abstract TimeSpan ComputeRetryDelay(TimeSpan? previous); | ||
} | ||
|
||
|
||
|
||
/// <summary> | ||
/// Represents information about notification failures encountered inside log consistency protocols. | ||
/// </summary> | ||
[Serializable] | ||
public abstract class NotificationFailed : ConnectionIssue | ||
{ | ||
/// <summary> | ||
/// The clusterId of the remote cluster to which we had an issue when sending change notifications. | ||
/// </summary> | ||
public string RemoteClusterId { get; set; } | ||
|
||
/// <summary> | ||
/// The exception we caught, or null if the problem was not caused by an exception. | ||
/// </summary> | ||
public Exception Exception { get; set; } | ||
} | ||
|
||
|
||
|
||
} |
Oops, something went wrong.