-
Notifications
You must be signed in to change notification settings - Fork 1k
Mark state transition & completion metrics with namespace activeness #3831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this change make metrics have a dip or spike during failover? When ns is active/passive in both clusters?
).Record( | ||
mutableState.GetExecutionInfo().StateTransitionCount, | ||
metrics.NamespaceTag(namespaceEntry.Name().String()), | ||
metrics.NamespaceStateTag(namespaceState(clusterMetadata, convert.Int64Ptr(mutableState.GetCurrentVersion()))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: MutableStateFailoverVersion(mutableState)?
Sorry, something went wrong.
All reactions
} | ||
|
||
// default value, need to special handle | ||
if *mutableStateCurrentVersion == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think logic can be shorten as
if (*mutableStateCurrentVersion == 0) || clusterMetadata.IsVersionFromSameCluster(...) {
return namespaceStateActive
}
any reason to pass mutableStateCurrentVersion
as a pointer instead of just scalar value?
Sorry, something went wrong.
All reactions
newWorkflowSnapshot *persistence.WorkflowSnapshot, | ||
newWorkflowEventsSeq []*persistence.WorkflowEvents, | ||
) (int64, error) | ||
|
||
ConflictResolveWorkflowExecution( | ||
ctx context.Context, | ||
conflictResolveMode persistence.ConflictResolveWorkflowMode, | ||
resetWorkflowFailoverVersion int64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just pass all FailoverVersions as int64 to be consistent here?
Sorry, something went wrong.
All reactions
namespaceStateUnknown = "_unknown_" | ||
) | ||
|
||
func namespaceState( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rename to something like getNamespaceState
Sorry, something went wrong.
All reactions
hehaifengcn
meiliang86
yux0
yiminc
Successfully merging this pull request may close these issues.
What changed?
Why?
Better metrics
How did you test it?
Existing tests
Potential risks
N/A
Is hotfix candidate?
N/A