Skip to content

Conversation

@yux0
Copy link
Contributor

@yux0 yux0 commented Jun 29, 2023

What changed?
Handle get namespace by id error

Why?
Handle get namespace by id error

How did you test it?

Potential risks

Is hotfix candidate?
Yes.

@yux0 yux0 requested a review from yycptt June 29, 2023 01:57
@yux0 yux0 requested a review from a team as a code owner June 29, 2023 01:57
Comment on lines 212 to 215
if e.state != ctasks.TaskStatePending {
e.Unlock()
return nil
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this part above the defer? don't think we need metrics for tasks that was cancelled. The lock is just for getting state & priority, and in one lock we can get and remember both values.


ns, err := e.namespaceRegistry.GetNamespaceByID(namespace.ID(e.GetNamespaceID()))
if err != nil {
return err
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to populate e.taggedMetricsHandler by doing
e.taggedMetricsHandler = e.metricsHandler.WithTags(e.estimateTaskMetricTag()...)

same for L236

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added them

@yux0 yux0 force-pushed the handle-ns-by-id-err branch from 3257f05 to 5480ded Compare June 29, 2023 18:40
@yux0 yux0 enabled auto-merge (squash) June 29, 2023 19:01
@yux0 yux0 merged commit f97237f into temporalio:master Jun 29, 2023
@yux0 yux0 deleted the handle-ns-by-id-err branch June 29, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants