Skip to content

Commit

Permalink
Does not return error in GenerateReplicationTasks when history not found
Browse files Browse the repository at this point in the history
Fixes temporalio#6468

Signed-off-by: Hardy Ferentschik <[email protected]>
  • Loading branch information
hferentschik committed Aug 30, 2024
1 parent c86712f commit c289a06
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions service/worker/migration/activities.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import (
"go.temporal.io/api/workflowservice/v1"
"go.temporal.io/sdk/activity"
"go.temporal.io/sdk/temporal"
"google.golang.org/protobuf/types/known/timestamppb"

"go.temporal.io/server/api/adminservice/v1"
enumsspb "go.temporal.io/server/api/enums/v1"
"go.temporal.io/server/api/historyservice/v1"
Expand All @@ -53,7 +55,6 @@ import (
"go.temporal.io/server/common/persistence"
"go.temporal.io/server/common/quotas"
"go.temporal.io/server/common/searchattribute"
"google.golang.org/protobuf/types/known/timestamppb"
)

type (
Expand Down Expand Up @@ -444,8 +445,9 @@ func (a *activities) GenerateReplicationTasks(ctx context.Context, request *gene
for i := startIndex; i < len(request.Executions); i++ {
we := request.Executions[i]
if err := a.generateWorkflowReplicationTask(ctx, rateLimiter, definition.NewWorkflowKey(request.NamespaceID, we.WorkflowId, we.RunId)); err != nil {
if !isNotFoundServiceError(err) {
a.logger.Error("force-replication failed to generate replication task", tag.WorkflowNamespaceID(request.NamespaceID), tag.WorkflowID(we.WorkflowId), tag.WorkflowRunID(we.RunId), tag.Error(err))
if isNotFoundServiceError(err) {
a.logger.Warn("force-replication failed to generate replication task", tag.WorkflowNamespaceID(request.NamespaceID), tag.WorkflowID(we.WorkflowId), tag.WorkflowRunID(we.RunId), tag.Error(err))
} else {
return err
}
}
Expand Down

0 comments on commit c289a06

Please sign in to comment.