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

ref(hc): Advisory lock #57958

Merged
merged 7 commits into from
Oct 12, 2023
Merged

ref(hc): Advisory lock #57958

merged 7 commits into from
Oct 12, 2023

Conversation

corps
Copy link
Contributor

@corps corps commented Oct 12, 2023

Pass 2 on #57877

Added better handling for operational error on lock timeout (something lost in the original PR), and also fixed the outbox contention issues around auth identity.

@corps corps requested a review from a team October 12, 2023 05:11
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 12, 2023
Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Looks good to me. We're handling the lock acquisition errors now and handling errors during unlocking as well.

@@ -76,7 +76,7 @@ def get_conflicting_unique_columns(
scope = category.get_scope()
scope_controlled_columns: List[str]
if scope == scope.USER_SCOPE:
scope_controlled_columns = [get_foreign_key_column(destination, User)]
scope_controlled_columns = ["ident", get_foreign_key_column(destination, User)]
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth leaving a comment here about this being for AuthIdentity? I would see this causing problems in the future if we have another user scope replicated model.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are correct! I'll add a comment on my next pass.

@corps corps merged commit fa0cf78 into master Oct 12, 2023
49 checks passed
@corps corps deleted the zc/outbox-advisory-lock branch October 12, 2023 16:59
@sentry-io
Copy link

sentry-io bot commented Oct 12, 2023

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ OutboxFlushError: Could not flush shard category=0 /saml/acs/{organization_slug}/ View Issue
  • ‼️ OutboxFlushError: Could not flush shard category=0 /auth/sso/ View Issue
  • ‼️ OutboxFlushError: Could not flush shard category=0 /saml/acs/{organization_slug}/ View Issue
  • ‼️ OutboxFlushError: Could not flush shard category=0 PipelineAdvancerView View Issue
  • ‼️ OutboxFlushError: Could not flush shard category=0 /remote/heroku/sso-login/ View Issue

Did you find this useful? React with a 👍 or 👎

@corps corps added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Oct 12, 2023
@getsentry-bot
Copy link
Contributor

PR reverted: 4b442eb

getsentry-bot added a commit that referenced this pull request Oct 12, 2023
This reverts commit fa0cf78.

Co-authored-by: corps <593850+corps@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components Trigger: Revert Add to a merged PR to revert it (skips CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants