Skip to content

Commit 70b5969

Browse files
authored
Remove unused cluster parameter from task notification (#3718)
1 parent 5a4e0a9 commit 70b5969

25 files changed

+74
-110
lines changed

service/history/historyEngine.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func (e *historyEngineImpl) registerNamespaceFailoverCallback() {
408408
for category := range e.queueProcessors {
409409
fakeTasks[category] = []tasks.Task{tasks.NewFakeTask(definition.WorkflowKey{}, category, now)}
410410
}
411-
e.NotifyNewTasks(e.currentClusterName, fakeTasks)
411+
e.NotifyNewTasks(fakeTasks)
412412
}
413413

414414
_ = e.shard.UpdateNamespaceNotificationVersion(newNotificationVersion)
@@ -692,7 +692,7 @@ func (e *historyEngineImpl) SyncShardStatus(
692692
// 3, notify the transfer (essentially a no op, just put it here so it looks symmetric)
693693
e.shard.SetCurrentTime(clusterName, now)
694694
for _, processor := range e.queueProcessors {
695-
processor.NotifyNewTasks(clusterName, []tasks.Task{})
695+
processor.NotifyNewTasks([]tasks.Task{})
696696
}
697697
return nil
698698
}
@@ -722,7 +722,6 @@ func (e *historyEngineImpl) NotifyNewHistoryEvent(
722722
}
723723

724724
func (e *historyEngineImpl) NotifyNewTasks(
725-
clusterName string,
726725
newTasks map[tasks.Category][]tasks.Task,
727726
) {
728727
for category, tasksByCategory := range newTasks {
@@ -736,7 +735,7 @@ func (e *historyEngineImpl) NotifyNewTasks(
736735
}
737736

738737
if len(tasksByCategory) > 0 {
739-
e.queueProcessors[category].NotifyNewTasks(clusterName, tasksByCategory)
738+
e.queueProcessors[category].NotifyNewTasks(tasksByCategory)
740739
}
741740
}
742741
}

service/history/historyEngine2_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ func (s *engine2Suite) SetupTest() {
124124
s.mockTxProcessor.EXPECT().Category().Return(tasks.CategoryTransfer).AnyTimes()
125125
s.mockTimerProcessor.EXPECT().Category().Return(tasks.CategoryTimer).AnyTimes()
126126
s.mockVisibilityProcessor.EXPECT().Category().Return(tasks.CategoryVisibility).AnyTimes()
127-
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
128-
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
129-
s.mockVisibilityProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
127+
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
128+
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
129+
s.mockVisibilityProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
130130

131131
s.config = tests.NewDynamicConfig()
132132
mockShard := shard.NewTestContext(

service/history/historyEngine3_eventsv2_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ func (s *engine3Suite) SetupTest() {
106106
s.mockTxProcessor.EXPECT().Category().Return(tasks.CategoryTransfer).AnyTimes()
107107
s.mockTimerProcessor.EXPECT().Category().Return(tasks.CategoryTimer).AnyTimes()
108108
s.mockVisibilityProcessor.EXPECT().Category().Return(tasks.CategoryVisibility).AnyTimes()
109-
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
110-
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
111-
s.mockVisibilityProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
109+
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
110+
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
111+
s.mockVisibilityProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
112112

113113
s.mockShard = shard.NewTestContext(
114114
s.controller,

service/history/historyEngine_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ func (s *engineSuite) SetupTest() {
132132
s.mockTxProcessor.EXPECT().Category().Return(tasks.CategoryTransfer).AnyTimes()
133133
s.mockTimerProcessor.EXPECT().Category().Return(tasks.CategoryTimer).AnyTimes()
134134
s.mockVisibilityProcessor.EXPECT().Category().Return(tasks.CategoryVisibility).AnyTimes()
135-
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
136-
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
137-
s.mockVisibilityProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
135+
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
136+
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
137+
s.mockVisibilityProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
138138
s.config = tests.NewDynamicConfig()
139139
s.mockShard = shard.NewTestContext(
140140
s.controller,

service/history/ndc/activity_replicator_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ func (s *activityReplicatorSuite) SetupTest() {
100100
s.mockTimerProcessor = queues.NewMockQueue(s.controller)
101101
s.mockTxProcessor.EXPECT().Category().Return(tasks.CategoryTransfer).AnyTimes()
102102
s.mockTimerProcessor.EXPECT().Category().Return(tasks.CategoryTimer).AnyTimes()
103-
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
104-
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
103+
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
104+
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
105105
s.mockShard = shard.NewTestContext(
106106
s.controller,
107107
&persistence.ShardInfoWithFailover{

service/history/ndc/workflow_resetter.go

-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ func (r *workflowResetterImpl) persistToDB(
368368
currentWorkflowEventsSeq,
369369
resetWorkflowSnapshot,
370370
resetWorkflowEventsSeq,
371-
resetWorkflow.GetMutableState().GetNamespaceEntry().ActiveClusterName(),
372371
); err != nil {
373372
return err
374373
} else {

service/history/ndc/workflow_resetter_test.go

-11
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,6 @@ func (s *workflowResetterSuite) TestPersistToDB_CurrentTerminated() {
184184
gomock.Any(),
185185
workflow.TransactionPolicyActive,
186186
).Return(resetSnapshot, resetEventsSeq, nil)
187-
resetMutableState.EXPECT().GetNamespaceEntry().Return(namespace.FromPersistentState(&persistence.GetNamespaceResponse{
188-
Namespace: &persistencespb.NamespaceDetail{
189-
Info: &persistencespb.NamespaceInfo{},
190-
Config: &persistencespb.NamespaceConfig{},
191-
ReplicationConfig: &persistencespb.NamespaceReplicationConfig{
192-
ActiveClusterName: "active-cluster-name",
193-
},
194-
},
195-
IsGlobalNamespace: false,
196-
}))
197187
resetContext.EXPECT().GetHistorySize().Return(resetEventsSize).AnyTimes()
198188
resetContext.EXPECT().SetHistorySize(resetEventsSize + resetNewEventsSize)
199189

@@ -204,7 +194,6 @@ func (s *workflowResetterSuite) TestPersistToDB_CurrentTerminated() {
204194
currentEventsSeq,
205195
resetSnapshot,
206196
resetEventsSeq,
207-
"active-cluster-name",
208197
).Return(currentNewEventsSize, resetNewEventsSize, nil)
209198

210199
err := s.workflowResetter.persistToDB(context.Background(), currentWorkflow, currentMutation, currentEventsSeq, resetWorkflow)

service/history/queues/queue.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type (
3535
Queue interface {
3636
common.Daemon
3737
Category() tasks.Category
38-
NotifyNewTasks(clusterName string, tasks []tasks.Task)
38+
NotifyNewTasks(tasks []tasks.Task)
3939
FailoverNamespace(namespaceIDs map[string]struct{})
4040
LockTaskProcessing()
4141
UnlockTaskProcessing()

service/history/queues/queue_immediate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (p *immediateQueue) Stop() {
135135
p.queueBase.Stop()
136136
}
137137

138-
func (p *immediateQueue) NotifyNewTasks(_ string, tasks []tasks.Task) {
138+
func (p *immediateQueue) NotifyNewTasks(tasks []tasks.Task) {
139139
if len(tasks) == 0 {
140140
return
141141
}

service/history/queues/queue_mock.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/history/queues/queue_scheduled.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func (p *scheduledQueue) Stop() {
160160
p.queueBase.Stop()
161161
}
162162

163-
func (p *scheduledQueue) NotifyNewTasks(_ string, tasks []tasks.Task) {
163+
func (p *scheduledQueue) NotifyNewTasks(tasks []tasks.Task) {
164164
if len(tasks) == 0 {
165165
return
166166
}

service/history/shard/context_impl.go

+3-9
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ func (s *ContextImpl) AddTasks(
664664
s.wUnlock()
665665

666666
if OperationPossiblySucceeded(err) {
667-
engine.NotifyNewTasks(namespaceEntry.ActiveClusterName(), request.Tasks)
667+
engine.NotifyNewTasks(request.Tasks)
668668
}
669669

670670
return err
@@ -1032,7 +1032,7 @@ func (s *ContextImpl) DeleteWorkflowExecution(
10321032
var newTasks map[tasks.Category][]tasks.Task
10331033
defer func() {
10341034
if OperationPossiblySucceeded(retErr) && newTasks != nil {
1035-
engine.NotifyNewTasks(namespaceEntry.ActiveClusterName(), newTasks)
1035+
engine.NotifyNewTasks(newTasks)
10361036
}
10371037
}()
10381038

@@ -1731,13 +1731,7 @@ func (s *ContextImpl) notifyQueueProcessor() {
17311731
fakeTasks[category] = []tasks.Task{tasks.NewFakeTask(definition.WorkflowKey{}, category, now)}
17321732
}
17331733

1734-
// TODO: with multi-cursor, we don't need the for loop
1735-
for clusterName, info := range s.clusterMetadata.GetAllClusterInfo() {
1736-
if !info.Enabled {
1737-
continue
1738-
}
1739-
engine.NotifyNewTasks(clusterName, fakeTasks)
1740-
}
1734+
engine.NotifyNewTasks(fakeTasks)
17411735
}
17421736

17431737
func (s *ContextImpl) loadShardMetadata(ownershipChanged *bool) error {

service/history/shard/context_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (s *contextSuite) TestAddTasks_Success() {
123123
}
124124

125125
s.mockExecutionManager.EXPECT().AddHistoryTasks(gomock.Any(), addTasksRequest).Return(nil)
126-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), tasks)
126+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(tasks)
127127

128128
err := s.mockShard.AddTasks(context.Background(), addTasksRequest)
129129
s.NoError(err)
@@ -229,7 +229,7 @@ func (s *contextSuite) TestDeleteWorkflowExecution_Success() {
229229
stage := tasks.DeleteWorkflowExecutionStageNone
230230

231231
s.mockExecutionManager.EXPECT().AddHistoryTasks(gomock.Any(), gomock.Any()).Return(nil)
232-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any())
232+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any())
233233
s.mockExecutionManager.EXPECT().DeleteCurrentWorkflowExecution(gomock.Any(), gomock.Any()).Return(nil)
234234
s.mockExecutionManager.EXPECT().DeleteWorkflowExecution(gomock.Any(), gomock.Any()).Return(nil)
235235
s.mockExecutionManager.EXPECT().DeleteHistoryBranch(gomock.Any(), gomock.Any()).Return(nil)
@@ -311,7 +311,7 @@ func (s *contextSuite) TestDeleteWorkflowExecution_ErrorAndContinue_Success() {
311311
branchToken := []byte("branchToken")
312312

313313
s.mockExecutionManager.EXPECT().AddHistoryTasks(gomock.Any(), gomock.Any()).Return(nil)
314-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any())
314+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any())
315315
s.mockExecutionManager.EXPECT().DeleteCurrentWorkflowExecution(gomock.Any(), gomock.Any()).Return(errors.New("some error"))
316316
stage := tasks.DeleteWorkflowExecutionStageNone
317317
err := s.mockShard.DeleteWorkflowExecution(
@@ -401,7 +401,7 @@ func (s *contextSuite) TestAcquireShardEventuallySucceeds() {
401401
Return(fmt.Errorf("temp error")).Times(3)
402402
s.mockShardManager.EXPECT().UpdateShard(gomock.Any(), gomock.Any()).
403403
Return(nil).Times(1)
404-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).MinTimes(1)
404+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any()).MinTimes(1)
405405

406406
s.mockShard.acquireShard()
407407

@@ -414,7 +414,7 @@ func (s *contextSuite) TestAcquireShardNoError() {
414414
WithMaximumAttempts(5)
415415
s.mockShardManager.EXPECT().UpdateShard(gomock.Any(), gomock.Any()).
416416
Return(nil).Times(1)
417-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).MinTimes(1)
417+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any()).MinTimes(1)
418418

419419
s.mockShard.acquireShard()
420420

service/history/shard/controller_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (s *controllerSuite) TestAcquireShardSuccess() {
164164
myShards = append(myShards, shardID)
165165
s.mockHistoryEngine.EXPECT().Start().Return()
166166
// notification step is done after engine is created, so may not be called when test finishes
167-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).MaxTimes(1)
167+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any()).MaxTimes(1)
168168
s.mockServiceResolver.EXPECT().Lookup(convert.Int32ToString(shardID)).Return(s.hostInfo, nil).Times(2)
169169
s.mockEngineFactory.EXPECT().CreateEngine(gomock.Any()).Return(s.mockHistoryEngine)
170170
s.mockShardManager.EXPECT().GetOrCreateShard(gomock.Any(), getOrCreateShardRequestMatcher(shardID)).Return(
@@ -234,7 +234,7 @@ func (s *controllerSuite) TestAcquireShardsConcurrently() {
234234
myShards = append(myShards, shardID)
235235
s.mockHistoryEngine.EXPECT().Start().Return()
236236
// notification step is done after engine is created, so may not be called when test finishes
237-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).MaxTimes(1)
237+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any()).MaxTimes(1)
238238
s.mockServiceResolver.EXPECT().Lookup(convert.Int32ToString(shardID)).Return(s.hostInfo, nil).Times(2)
239239
s.mockEngineFactory.EXPECT().CreateEngine(gomock.Any()).Return(s.mockHistoryEngine)
240240
s.mockShardManager.EXPECT().GetOrCreateShard(gomock.Any(), getOrCreateShardRequestMatcher(shardID)).Return(
@@ -313,7 +313,7 @@ func (s *controllerSuite) TestAcquireShardRenewSuccess() {
313313
for shardID := int32(1); shardID <= numShards; shardID++ {
314314
s.mockHistoryEngine.EXPECT().Start().Return()
315315
// notification step is done after engine is created, so may not be called when test finishes
316-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).MaxTimes(1)
316+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any()).MaxTimes(1)
317317
s.mockServiceResolver.EXPECT().Lookup(convert.Int32ToString(shardID)).Return(s.hostInfo, nil).Times(2)
318318
s.mockEngineFactory.EXPECT().CreateEngine(gomock.Any()).Return(s.mockHistoryEngine)
319319
s.mockShardManager.EXPECT().GetOrCreateShard(gomock.Any(), getOrCreateShardRequestMatcher(shardID)).Return(
@@ -377,7 +377,7 @@ func (s *controllerSuite) TestAcquireShardRenewLookupFailed() {
377377
for shardID := int32(1); shardID <= numShards; shardID++ {
378378
s.mockHistoryEngine.EXPECT().Start().Return()
379379
// notification step is done after engine is created, so may not be called when test finishes
380-
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).MaxTimes(1)
380+
s.mockHistoryEngine.EXPECT().NotifyNewTasks(gomock.Any()).MaxTimes(1)
381381
s.mockServiceResolver.EXPECT().Lookup(convert.Int32ToString(shardID)).Return(s.hostInfo, nil).Times(2)
382382
s.mockEngineFactory.EXPECT().CreateEngine(gomock.Any()).Return(s.mockHistoryEngine)
383383
s.mockShardManager.EXPECT().GetOrCreateShard(gomock.Any(), getOrCreateShardRequestMatcher(shardID)).Return(
@@ -730,7 +730,7 @@ func (s *controllerSuite) TestShardControllerFuzz() {
730730
mockEngine := NewMockEngine(disconnectedMockController)
731731
status := new(int32)
732732
// notification step is done after engine is created, so may not be called when test finishes
733-
mockEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).MaxTimes(1)
733+
mockEngine.EXPECT().NotifyNewTasks(gomock.Any()).MaxTimes(1)
734734
mockEngine.EXPECT().Start().Do(func() {
735735
if !atomic.CompareAndSwapInt32(status, common.DaemonStatusInitialized, common.DaemonStatusStarted) {
736736
return
@@ -850,7 +850,7 @@ func (s *controllerSuite) setupMocksForAcquireShard(
850850
// s.mockResource.ExecutionMgr.On("Close").Return()
851851
mockEngine.EXPECT().Start().MinTimes(minTimes)
852852
// notification step is done after engine is created, so may not be called when test finishes
853-
mockEngine.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).MaxTimes(1)
853+
mockEngine.EXPECT().NotifyNewTasks(gomock.Any()).MaxTimes(1)
854854
s.mockServiceResolver.EXPECT().Lookup(convert.Int32ToString(shardID)).Return(s.hostInfo, nil).Times(2).MinTimes(minTimes)
855855
s.mockEngineFactory.EXPECT().CreateEngine(contextMatcher(shardID)).Return(mockEngine).MinTimes(minTimes)
856856
s.mockShardManager.EXPECT().GetOrCreateShard(gomock.Any(), getOrCreateShardRequestMatcher(shardID)).Return(

service/history/shard/engine.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ type (
8989
UpdateWorkflow(ctx context.Context, request *historyservice.UpdateWorkflowRequest) (*historyservice.UpdateWorkflowResponse, error)
9090

9191
NotifyNewHistoryEvent(event *events.Notification)
92-
NotifyNewTasks(clusterName string, tasks map[tasks.Category][]tasks.Task)
92+
NotifyNewTasks(tasks map[tasks.Category][]tasks.Task)
9393
}
9494
)

service/history/shard/engine_mock.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/history/timerQueueActiveTaskExecutor_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ func (s *timerQueueActiveTaskExecutorSuite) SetupTest() {
118118
s.mockTxProcessor.EXPECT().Category().Return(tasks.CategoryTransfer).AnyTimes()
119119
s.mockTimerProcessor.EXPECT().Category().Return(tasks.CategoryTimer).AnyTimes()
120120
s.mockVisibilityProcessor.EXPECT().Category().Return(tasks.CategoryVisibility).AnyTimes()
121-
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
122-
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
123-
s.mockVisibilityProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
121+
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
122+
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
123+
s.mockVisibilityProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
124124

125125
config := tests.NewDynamicConfig()
126126
s.mockShard = shard.NewTestContextWithTimeSource(

service/history/timerQueueStandbyTaskExecutor_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ func (s *timerQueueStandbyTaskExecutorSuite) SetupTest() {
128128
s.mockTimerProcessor = queues.NewMockQueue(s.controller)
129129
s.mockTxProcessor.EXPECT().Category().Return(tasks.CategoryTransfer).AnyTimes()
130130
s.mockTimerProcessor.EXPECT().Category().Return(tasks.CategoryTimer).AnyTimes()
131-
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
132-
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
131+
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
132+
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
133133

134134
s.mockShard = shard.NewTestContextWithTimeSource(
135135
s.controller,

service/history/transferQueueActiveTaskExecutor_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ func (s *transferQueueActiveTaskExecutorSuite) SetupTest() {
156156
s.mockTimerProcessor = queues.NewMockQueue(s.controller)
157157
s.mockTxProcessor.EXPECT().Category().Return(tasks.CategoryTransfer).AnyTimes()
158158
s.mockTimerProcessor.EXPECT().Category().Return(tasks.CategoryTimer).AnyTimes()
159-
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
160-
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any(), gomock.Any()).AnyTimes()
159+
s.mockTxProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
160+
s.mockTimerProcessor.EXPECT().NotifyNewTasks(gomock.Any()).AnyTimes()
161161

162162
config := tests.NewDynamicConfig()
163163
s.mockShard = shard.NewTestContextWithTimeSource(

service/history/workflow/context.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ func (c *ContextImpl) CreateWorkflowExecution(
360360
if err != nil {
361361
return err
362362
}
363-
NotifyWorkflowSnapshotTasks(engine, newWorkflow, newMutableState.GetNamespaceEntry().ActiveClusterName())
363+
NotifyWorkflowSnapshotTasks(engine, newWorkflow)
364364
emitStateTransitionCount(c.metricsHandler, newMutableState)
365365

366366
return nil
@@ -457,7 +457,6 @@ func (c *ContextImpl) ConflictResolveWorkflowExecution(
457457
newWorkflowEventsSeq,
458458
currentWorkflow,
459459
currentWorkflowEventsSeq,
460-
resetMutableState.GetNamespaceEntry().ActiveClusterName(),
461460
); err != nil {
462461
return err
463462
} else {
@@ -633,7 +632,6 @@ func (c *ContextImpl) UpdateWorkflowExecutionWithNew(
633632
currentWorkflowEventsSeq,
634633
newWorkflow,
635634
newWorkflowEventsSeq,
636-
c.MutableState.GetNamespaceEntry().ActiveClusterName(),
637635
); err != nil {
638636
return err
639637
} else {
@@ -684,7 +682,6 @@ func (c *ContextImpl) SetWorkflowExecution(ctx context.Context, now time.Time) (
684682
return c.transaction.SetWorkflowExecution(
685683
ctx,
686684
resetWorkflowSnapshot,
687-
c.MutableState.GetNamespaceEntry().ActiveClusterName(),
688685
)
689686
}
690687

0 commit comments

Comments
 (0)