Skip to content

Commit

Permalink
Improve XDC logging (#4932)
Browse files Browse the repository at this point in the history
<!-- Describe what has changed in this PR -->
**What changed?**
* Improve XDC logging

<!-- Tell your future self why have you made these changes -->
**Why?**
Improve XDC logging

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
N/A

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**
N/A

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
N/A
  • Loading branch information
wxing1292 authored and rodrigozhou committed Oct 6, 2023
1 parent 8cadb94 commit ba63918
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,21 @@ func (p *namespaceReplicationMessageProcessor) handleNamespaceReplicationTask(

switch task.TaskType {
case enumsspb.REPLICATION_TASK_TYPE_NAMESPACE_TASK:
return p.namespaceTaskExecutor.Execute(ctx, task.GetNamespaceTaskAttributes())
attr := task.GetNamespaceTaskAttributes()
err := p.namespaceTaskExecutor.Execute(ctx, attr)
if err != nil {
p.logger.Error("unable to process namespace replication task",
tag.WorkflowNamespaceID(attr.Id))
}
return err
case enumsspb.REPLICATION_TASK_TYPE_TASK_QUEUE_USER_DATA:
return p.handleTaskQueueUserDataReplicationTask(ctx, task.GetTaskQueueUserDataAttributes())
attr := task.GetTaskQueueUserDataAttributes()
err := p.handleTaskQueueUserDataReplicationTask(ctx, attr)
if err != nil {
p.logger.Error(fmt.Sprintf("unable to process task queue metadata replication task, %v", attr.TaskQueueName),
tag.WorkflowNamespaceID(attr.NamespaceId))
}
return err
default:
return fmt.Errorf("cannot handle replication task of type %v", task.TaskType)
}
Expand Down

0 comments on commit ba63918

Please sign in to comment.