Skip to content

Commit 0f8e48e

Browse files
committed
Remove worker_instance_key as it is not needed
1 parent eab94b0 commit 0f8e48e

13 files changed

Lines changed: 13 additions & 44 deletions

File tree

api/persistence/v1/executions.pb.go

Lines changed: 4 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/internal/temporal/server/api/persistence/v1/executions.proto

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,8 @@ message ActivityInfo {
632632

633633
int64 start_version = 50;
634634

635-
// Unique identifier of the worker that is this activity.
636-
string worker_instance_key = 51;
637-
638635
// The task queue on which the server will send control tasks to the worker running this activity.
639-
string worker_control_task_queue = 52;
636+
string worker_control_task_queue = 51;
640637
}
641638

642639
// timer_map column

service/history/api/recordactivitytaskstarted/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ func recordActivityTaskStarted(
242242
if _, err := mutableState.AddActivityTaskStartedEvent(
243243
ai, scheduledEventID, requestID, request.PollRequest.GetIdentity(),
244244
versioningStamp, pollerDeployment, request.GetBuildIdRedirectInfo(),
245-
request.PollRequest.GetWorkerInstanceKey(),
246245
request.PollRequest.GetWorkerControlTaskQueue(),
247246
); err != nil {
248247
return nil, rejectCodeUndefined, err

service/history/api/respondactivitytaskcompleted/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ func Invoke(
9898
// TODO (shahab): do we need to do anything with wf redirect in this case or any
9999
// other case where an activity starts?
100100
nil,
101-
"", // workerInstanceKey not available for force complete
102101
"", // workerControlTaskQueue not available for force complete
103102
)
104103
if err != nil {

service/history/api/respondworkflowtaskcompleted/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ func (handler *WorkflowTaskCompletedHandler) Invoke(
389389

390390
workflowTaskHandler := newWorkflowTaskCompletedHandler(
391391
request.GetIdentity(),
392-
request.GetWorkerInstanceKey(),
393392
request.GetWorkerControlTaskQueue(),
394393
completedEvent.GetEventId(), // If completedEvent is nil, then GetEventId() returns 0 and this value shouldn't be used in workflowTaskHandler.
395394
ms,

service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ type (
5353

5454
workflowTaskCompletedHandler struct {
5555
identity string
56-
workerInstanceKey string
5756
workerControlTaskQueue string
5857
workflowTaskCompletedID int64
5958

@@ -106,7 +105,6 @@ type (
106105

107106
func newWorkflowTaskCompletedHandler(
108107
identity string,
109-
workerInstanceKey string,
110108
workerControlTaskQueue string,
111109
workflowTaskCompletedID int64,
112110
mutableState historyi.MutableState,
@@ -127,7 +125,6 @@ func newWorkflowTaskCompletedHandler(
127125
) *workflowTaskCompletedHandler {
128126
return &workflowTaskCompletedHandler{
129127
identity: identity,
130-
workerInstanceKey: workerInstanceKey,
131128
workerControlTaskQueue: workerControlTaskQueue,
132129
workflowTaskCompletedID: workflowTaskCompletedID,
133130

@@ -565,7 +562,6 @@ func (handler *workflowTaskCompletedHandler) handlePostCommandEagerExecuteActivi
565562
stamp,
566563
nil,
567564
nil,
568-
handler.workerInstanceKey,
569565
handler.workerControlTaskQueue,
570566
); err != nil {
571567
return nil, err

service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ func TestCommandProtocolMessage(t *testing.T) {
8484
)
8585
out.handler = newWorkflowTaskCompletedHandler( // 😲
8686
t.Name(), // identity
87-
"", // workerInstanceKey
8887
"", // workerControlTaskQueue
8988
123, // workflowTaskCompletedID
9089
out.ms,

service/history/history_engine_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6680,7 +6680,6 @@ func addActivityTaskStartedEvent(ms historyi.MutableState, scheduledEventID int6
66806680
nil,
66816681
nil,
66826682
"",
6683-
"",
66846683
)
66856684
return event
66866685
}

service/history/interfaces/mutable_state.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ type (
5757
*commonpb.WorkerVersionStamp,
5858
*deploymentpb.Deployment,
5959
*taskqueuespb.BuildIdRedirectInfo,
60-
string, // workerInstanceKey
6160
string, // workerControlTaskQueue
6261
) (*historypb.HistoryEvent, error)
6362
AddActivityTaskTimedOutEvent(int64, int64, *failurepb.Failure, enumspb.RetryState) (*historypb.HistoryEvent, error)

service/history/interfaces/mutable_state_mock.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)