Skip to content
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

Make search sync asynchronous when merging orgs #2053

Merged
merged 1 commit into from
Jan 10, 2024

Commits on Jan 9, 2024

  1. Make search sync asynchronous when merging orgs

    There are two issues with search sync being synchronous right now:
    1. It might take longer to sync to search than to execute a finalizing
       temporal workflow. If this happens, temporal workflow will notify
       frontend about finishing org merging before this method returns. This
       means, frontend learns about org merging being done before it learns
       the org merging even started.
    2. Synchronous search sync might fail. Since we execute it outside of a
       database transaction, the error frontend sees will be misleading.
       Because, on one hand, the request to merge orgs failed, but on the
       other hand it actually did something, transaction got commited, it
       can't be retried.
    
    As a result, the solution:
    1. Make search sync asynchronous, so it doesn't fail (or fails much less
       often)
    2. Execute it before starting executing temporal workflow. So there is
       as little delay as possible between starting a temporal workflow and
       returning something to frontend
    sausage-todd committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    9555938 View commit details
    Browse the repository at this point in the history