8000 Get execution start/close time when using cassandra visibility store by rodrigozhou · Pull Request #4549 · temporalio/temporal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Get execution start/close time when using cassandra visibility store #4549

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

Merged

Conversation

rodrigozhou
Copy link
Contributor

What changed?
Check if it's using Cassandra visibility store before getting execution start/close time.

Why?
Start/close time is only needed for deletion if it's using Cassandra as visibility store.

How did you test it?
Unit test.

Potential risks
No.

Is hotfix candidate?
No.

@rodrigozhou rodrigozhou requested review from yycptt and yiminc June 27, 2023 15:00
@rodrigozhou rodrigozhou requested a review from a team as a code owner June 27, 2023 15:00
@rodrigozhou rodrigozhou force-pushed the delete-manager-cass-check branch from a342ea0 to f264a67 Compare June 27, 2023 21:09
Comment on lines 212 to +214
var startTime *time.Time
var closeTime *time.Time
// There are cases when workflow execution is closed but visibility is not updated and still open.
// This happens, for example, when workflow execution is deleted right from CloseExecutionTask.
// Therefore, force to delete from open visibility regardless of execution state.
if forceDeleteFromOpenVisibility || ms.GetExecutionState().State != enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED {
startTime = ms.GetExecutionInfo().GetStartTime()
} else {
closeTime, err = ms.GetWorkflowCloseTime(ctx)
if err != nil {
return err
if m.visibilityManager.HasStoreName(cassandra.CassandraPersistenceName) {
Copy link
Contributor Author
@rodrigozhou rodrigozhou Jun 28, 2023

Choose a reason for hiding this comment

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

When these values are nil, the visibility task will fail (panic) only when using Cassandra.

@rodrigozhou rodrigozhou merged commit 87cc6f4 into temporalio:master Jun 28, 2023
@rodrigozhou rodrigozhou deleted the delete-manager-cass-check branch June 28, 2023 18:14
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.

3 participants
0