Skip to content

Commit

Permalink
Remove Microsoft.ServiceFabric.Actors.Migration namespace
Browse files Browse the repository at this point in the history
Types in this namespace were created to support the abandoned KVS to RC state migration effort.
  • Loading branch information
olegsych committed Jun 19, 2024
1 parent 714677e commit 154af8b
Show file tree
Hide file tree
Showing 35 changed files with 10 additions and 2,180 deletions.
222 changes: 0 additions & 222 deletions src/Microsoft.ServiceFabric.Actors/ActorEventSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,6 @@ internal sealed class ActorEventSource : ServiceFabricEventSource
"serviceTypeName = {6}, applicationName = {7}, applicationTypeName = {8}, " +
"ownerActorId = {9}, reminderPeriod = {10}, reminderName = {11}";

#region Migration
private const string MigrationBaseFormat = "{0} : " +
"clusterOsType = {1}, " +
"runtimePlatform = {2}, " +
"partitionId = {3}, " +
"replicaId = {4}, " +
"serviceName = {5}, " +
"serviceTypeName = {6}, " +
"applicationName = {7}, " +
"applicationTypeName = {8}";

private const int MigrationStartEventId = 8;
private const string MigrationStartEventFormat = MigrationBaseFormat + ", settings = {9}";

private const int MigrationEndEventId = 9;
private const string MigrationEndEventFormat = MigrationBaseFormat + ", result = {9}";

private const int MigrationPhaseStartEventId = 10;
private const string MigrationPhaseStartEventFormat = MigrationBaseFormat + ", input = {9}";

private const int MigrationPhaseEndEventId = 11;
private const string MigrationPhaseEndEventFormat = MigrationBaseFormat + ", result = {9}";

private const int MigrationFailureEventId = 12;
private const string MigrationFailureEventFormat = MigrationBaseFormat + ", phase = {9}, errorMessage = {10}";

private const int MigrationAbortEventId = 13;
private const string MigrationAbortEventFormat = MigrationBaseFormat + ", userTriggered = {9}";

#endregion Migration

/// <summary>
/// Prevents a default instance of the <see cref="ActorEventSource" /> class from being created.
/// </summary>
Expand Down Expand Up @@ -227,197 +196,6 @@ internal void WriteNoiseWithId(string type, string id, string format, params obj

#endregion

#region MigrationEvents
[Event(
MigrationStartEventId,
Message = MigrationStartEventFormat,
Level = EventLevel.Informational,
Keywords = Keywords.Default)]
internal void MigrationStartEvent(
string type,
string clusterOsType,
string runtimePlatform,
string partitionId,
string replicaId,
string serviceName,
string serviceTypeName,
string applicationName,
string applicationTypeName,
string settingsJson)
{
this.WriteEvent(
MigrationStartEventId,
type,
clusterOsType,
runtimePlatform,
partitionId,
replicaId,
serviceName,
serviceTypeName,
applicationName,
applicationTypeName,
settingsJson);
}

[Event(
MigrationEndEventId,
Message = MigrationEndEventFormat,
Level = EventLevel.Informational,
Keywords = Keywords.Default)]
internal void MigrationEndEvent(
string type,
string clusterOsType,
string runtimePlatform,
string partitionId,
string replicaId,
string serviceName,
string serviceTypeName,
string applicationName,
string applicationTypeName,
string resultJson)
{
this.WriteEvent(
MigrationEndEventId,
type,
clusterOsType,
runtimePlatform,
partitionId,
replicaId,
serviceName,
serviceTypeName,
applicationName,
applicationTypeName,
resultJson);
}

[Event(
MigrationPhaseStartEventId,
Message = MigrationPhaseStartEventFormat,
Level = EventLevel.Informational,
Keywords = Keywords.Default)]
internal void MigrationPhaseStartEvent(
string type,
string clusterOsType,
string runtimePlatform,
string partitionId,
string replicaId,
string serviceName,
string serviceTypeName,
string applicationName,
string applicationTypeName,
string inputJson)
{
this.WriteEvent(
MigrationPhaseStartEventId,
type,
clusterOsType,
runtimePlatform,
partitionId,
replicaId,
serviceName,
serviceTypeName,
applicationName,
applicationTypeName,
inputJson);
}

[Event(
MigrationPhaseEndEventId,
Message = MigrationPhaseEndEventFormat,
Level = EventLevel.Informational,
Keywords = Keywords.Default)]
internal void MigrationPhaseEndEvent(
string type,
string clusterOsType,
string runtimePlatform,
string partitionId,
string replicaId,
string serviceName,
string serviceTypeName,
string applicationName,
string applicationTypeName,
string resultJson)
{
this.WriteEvent(
MigrationPhaseEndEventId,
type,
clusterOsType,
runtimePlatform,
partitionId,
replicaId,
serviceName,
serviceTypeName,
applicationName,
applicationTypeName,
resultJson);
}

[Event(
MigrationFailureEventId,
Message = MigrationFailureEventFormat,
Level = EventLevel.Error,
Keywords = Keywords.Default)]
internal void MigrationFailureEvent(
string type,
string clusterOsType,
string runtimePlatform,
string partitionId,
string replicaId,
string serviceName,
string serviceTypeName,
string applicationName,
string applicationTypeName,
string phase,
string errorMsg)
{
this.WriteEvent(
MigrationFailureEventId,
type,
clusterOsType,
runtimePlatform,
partitionId,
replicaId,
serviceName,
serviceTypeName,
applicationName,
applicationTypeName,
phase,
errorMsg);
}

[Event(
MigrationAbortEventId,
Message = MigrationAbortEventFormat,
Level = EventLevel.Informational,
Keywords = Keywords.Default)]
internal void MigrationAbortEvent(
string type,
string clusterOsType,
string runtimePlatform,
string partitionId,
string replicaId,
string serviceName,
string serviceTypeName,
string applicationName,
string applicationTypeName,
bool userTriggered)
{
this.WriteEvent(
MigrationAbortEventId,
type,
clusterOsType,
runtimePlatform,
partitionId,
replicaId,
serviceName,
serviceTypeName,
applicationName,
applicationTypeName,
userTriggered);
}

#endregion MigrationEvents

#region Events
[Event(1, Message = "{2}", Level = EventLevel.Informational, Keywords = Keywords.Default)]
private void InfoText(string id, string type, string message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace Microsoft.ServiceFabric.Actors
using System;
using System.Collections.Generic;
using System.Fabric;
using Microsoft.ServiceFabric.Actors.Migration.Exceptions;
using Microsoft.ServiceFabric.Actors.Runtime;
using Microsoft.ServiceFabric.Services.Communication;

Expand Down Expand Up @@ -83,30 +82,6 @@ internal class FabricActorExceptionKnownTypes
InnerExFunc = ex => GetInnerExceptions(ex),
}
},
{
"Microsoft.ServiceFabric.Actors.Migration.Exceptions.ActorCallsDisallowedException", new ConvertorFuncs()
{
ToServiceExFunc = ex => ToServiceException(ex),
FromServiceExFunc = (svcEx, innerEx) => FromServiceException<ActorCallsDisallowedException>(svcEx, innerEx),
InnerExFunc = ex => GetInnerExceptions(ex),
}
},
{
"Microsoft.ServiceFabric.Actors.Migration.Exceptions.InvalidMigrationConfigException", new ConvertorFuncs()
{
ToServiceExFunc = ex => ToServiceException(ex),
FromServiceExFunc = (svcEx, innerEx) => FromServiceException<InvalidMigrationConfigException>(svcEx, innerEx),
InnerExFunc = ex => GetInnerExceptions(ex),
}
},
{
"Microsoft.ServiceFabric.Actors.Migration.Exceptions.InvalidMigrationStateProviderException", new ConvertorFuncs()
{
ToServiceExFunc = ex => ToServiceException(ex),
FromServiceExFunc = (svcEx, innerEx) => FromServiceException<InvalidMigrationStateProviderException>(svcEx, innerEx),
InnerExFunc = ex => GetInnerExceptions(ex),
}
},
};

private static ServiceException ToServiceException(FabricException fabricEx)
Expand Down

This file was deleted.

Loading

0 comments on commit 154af8b

Please sign in to comment.