Skip to content

Conversation

rodrigozhou
Copy link
Contributor

What changed?
MySQL select query for visibility change to do LEFT JOIN instead of INNER JOIN.

Why?
For backward compatibility, old workflows won't have a corresponding row in custom_search_attributes table, but they are valid workflows. Doing a left join makes sure that all executions are listed correctly.

How did you test it?
Started Server using standard visibility, created workflows, upgraded DB schema to support advanced visibility, and restarted Server. Open UI to list all workflows, and now it's listing everything.

Potential risks
None.

Is hotfix candidate?
No.

@rodrigozhou rodrigozhou requested a review from alexshtin February 7, 2023 00:09
@rodrigozhou rodrigozhou requested a review from a team as a code owner February 7, 2023 00:09
@@ -223,7 +223,7 @@ func (c *mysqlQueryConverter) buildSelectStmt(
return fmt.Sprintf(
`SELECT %s
FROM executions_visibility ev
INNER JOIN custom_search_attributes
LEFT JOIN custom_search_attributes
Copy link
Contributor

Choose a reason for hiding this comment

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

What's about other 2 (PostgreSQL and SQLite)?

@rodrigozhou rodrigozhou merged commit a65c7d4 into temporalio:master Feb 7, 2023
@rodrigozhou rodrigozhou deleted the fix-mysql-vis-select-query branch February 7, 2023 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants