diff --git a/common/namespace/replication_task_executor.go b/common/namespace/replication_task_executor.go index fdca5469b5..9ace7d61d2 100644 --- a/common/namespace/replication_task_executor.go +++ b/common/namespace/replication_task_executor.go @@ -64,10 +64,10 @@ var ( ErrNameUUIDCollision = serviceerror.NewInvalidArgument("namespace replication encountered name / UUID collision") ) -// NOTE: the counterpart of namespace replication transmission logic is in service/fropntend package +// NOTE: the counterpart of namespace replication transmission logic is in service/frontend package type ( - // ReplicationTaskExecutor is the interface which is to execute namespace replication task + // ReplicationTaskExecutor is the interface for executing namespace replication tasks ReplicationTaskExecutor interface { Execute(ctx context.Context, task *replicationspb.NamespaceTaskAttributes) error } @@ -79,7 +79,7 @@ type ( } ) -// NewReplicationTaskExecutor create a new instance of namespace replicator +// NewReplicationTaskExecutor creates a new instance of namespace replicator func NewReplicationTaskExecutor( currentCluster string, metadataManagerV2 persistence.MetadataManager, diff --git a/common/util.go b/common/util.go index 843d8160b3..abd18d875f 100644 --- a/common/util.go +++ b/common/util.go @@ -726,9 +726,9 @@ func CheckEventBlobSizeLimit( return nil } -// ValidateLongPollContextTimeout check if the context timeout for a long poll handler is too short or below a normal value. -// If the timeout is not set or too short, it logs an error, and return ErrContextTimeoutNotSet or ErrContextTimeoutTooShort -// accordingly. If the timeout is only below a normal value, it just logs an info and return nil. +// ValidateLongPollContextTimeout checks if the context timeout for a long poll handler is too short or below a normal value. +// If the timeout is not set or too short, it logs an error, and returns ErrContextTimeoutNotSet or ErrContextTimeoutTooShort +// accordingly. If the timeout is only below a normal value, it just logs an info and returns nil. func ValidateLongPollContextTimeout( ctx context.Context, handlerName string, diff --git a/config/development-cluster-a.yaml b/config/development-cluster-a.yaml index c7935d9776..269b86d316 100644 --- a/config/development-cluster-a.yaml +++ b/config/development-cluster-a.yaml @@ -30,8 +30,6 @@ global: port: 7936 metrics: prometheus: -# # specify framework to use new approach for initializing metrics and/or use opentelemetry -# framework: "opentelemetry" framework: "opentelemetry" timerType: "histogram" listenAddress: "127.0.0.1:8000" diff --git a/config/development-cluster-b.yaml b/config/development-cluster-b.yaml index f1c76883a0..5b276ac654 100644 --- a/config/development-cluster-b.yaml +++ b/config/development-cluster-b.yaml @@ -30,8 +30,6 @@ global: port: 8936 metrics: prometheus: -# # specify framework to use new approach for initializing metrics and/or use opentelemetry -# framework: "opentelemetry" framework: "opentelemetry" timerType: "histogram" listenAddress: "127.0.0.1:8001" diff --git a/config/development-cluster-c.yaml b/config/development-cluster-c.yaml index 61bcfa2ae0..76eedac24e 100644 --- a/config/development-cluster-c.yaml +++ b/config/development-cluster-c.yaml @@ -30,8 +30,6 @@ global: port: 9936 metrics: prometheus: -# # specify framework to use new approach for initializing metrics and/or use opentelemetry -# framework: "opentelemetry" framework: "opentelemetry" timerType: "histogram" listenAddress: "127.0.0.1:8002" diff --git a/develop/docker-compose/docker-compose.cdc.darwin.yml b/develop/docker-compose/docker-compose.cdc.darwin.yml index 3e8c31bd21..f6d1cada3a 100644 --- a/develop/docker-compose/docker-compose.cdc.darwin.yml +++ b/develop/docker-compose/docker-compose.cdc.darwin.yml @@ -1,4 +1,4 @@ -# Overrides for CDD for Mac/Darwin users. +# Overrides for CDC for MacOS (Darwin) users. version: "3.5" services: diff --git a/service/history/api/getworkflowexecutionhistory/api.go b/service/history/api/getworkflowexecutionhistory/api.go index de931757f7..a8a54dd2f1 100644 --- a/service/history/api/getworkflowexecutionhistory/api.go +++ b/service/history/api/getworkflowexecutionhistory/api.go @@ -171,9 +171,9 @@ func Invoke( continuationToken.PersistenceToken = nil } - // TODO below is a temporal solution to guard against invalid event batch - // when data inconsistency occurs - // long term solution should check event batch pointing backwards within history store + // TODO below is a temporary solution to guard against invalid event batch + // when data inconsistency occurs. Long term solution should check event + // batch pointing backwards within history store. defer func() { if _, ok := retError.(*serviceerror.DataLoss); ok { api.TrimHistoryNode( diff --git a/service/history/historybuilder/event_store.go b/service/history/historybuilder/event_store.go index 5cd29a6449..ad707c7a44 100644 --- a/service/history/historybuilder/event_store.go +++ b/service/history/historybuilder/event_store.go @@ -287,12 +287,6 @@ func (b *EventStore) bufferEvent( return false case // events generated directly from commands should not be buffered - // workflow complete, failed, cancelled and continue-as-new events are duplication of above - // just put is here for reference - // workflow.EventTypeWorkflowExecutionCompleted, - // workflow.EventTypeWorkflowExecutionFailed, - // workflow.EventTypeWorkflowExecutionCanceled, - // workflow.EventTypeWorkflowExecutionContinuedAsNew, enumspb.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED, enumspb.EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED, enumspb.EVENT_TYPE_TIMER_STARTED, @@ -313,7 +307,6 @@ func (b *EventStore) bufferEvent( enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED: - // do not buffer event if event is directly generated from a message return false default: diff --git a/service/history/historybuilder/history_builder_test.go b/service/history/historybuilder/history_builder_test.go index 1b5625cf31..ba6982e0e7 100644 --- a/service/history/historybuilder/history_builder_test.go +++ b/service/history/historybuilder/history_builder_test.go @@ -2200,7 +2200,7 @@ func (s *historyBuilderSuite) TestBufferEvent() { enumspb.EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT: true, } - // events corresponding to commands from client will be assign event ID immediately + // events corresponding to commands from client will be assigned an event ID immediately commandEvents := map[enumspb.EventType]bool{ enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED: true, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_FAILED: true, @@ -2218,14 +2218,14 @@ func (s *historyBuilderSuite) TestBufferEvent() { enumspb.EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED: true, } - // events corresponding to message from client will be assign event ID immediately + // events corresponding to message from client will be assigned an event ID immediately messageEvents := map[enumspb.EventType]bool{ enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED: true, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED: true, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED: true, } - // other events will not be assign event ID immediately (created automatically) + // other events will not be assigned an event ID immediately (created automatically) otherEvents := map[enumspb.EventType]bool{} for _, eventType := range enumspb.EventType_value { if _, ok := workflowEvents[enumspb.EventType(eventType)]; ok { diff --git a/service/history/workflow/update/update.go b/service/history/workflow/update/update.go index d5ff9e492e..e0750e20d9 100644 --- a/service/history/workflow/update/update.go +++ b/service/history/workflow/update/update.go @@ -241,8 +241,8 @@ func (u *Update) WaitOutcome(ctx context.Context) (UpdateStatus, error) { return UpdateStatus{enumspb.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED, outcome}, nil } -// WaitAccepted blocks on the acceptance of this update, returning nil if has -// been accepted but not yet completed or the overall Outcome if the update has +// WaitAccepted blocks on the acceptance of this update, returning nil if it has +// been accepted but not yet completed, or the overall Outcome if the update has // been completed (including completed by rejection). This call will block until // the acceptance occurs or the provided context.Context expires. // It is safe to call this method outside of workflow lock.