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

Fixes #1654: Switch to a spin pg_try_advisory_lock #1656

Closed
wants to merge 1 commit into from

Conversation

@jhinch
Copy link

@jhinch jhinch commented Jun 1, 2017

Postgres can deadlock with a pending pg_advisory_lock and
a long running CREATE INDEX CONCURRENTLY statement.

  • Reproduce the deadlock in PostgreSQLConcurrentMigrationMediumTest
    with a modified version of the regular ConcurrentMigrationMediumTest
  • Modify PostgreSQLAdvisoryLockTemplate to spin until
    pg_try_advisory_lock returns true or it is interrupted
  • Sleep for 100ms on failed attempt to acquire the advisory lock
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Sep 5, 2017

Could you sign the CLA and resolve conflicts so this can be merged? Thanks!

@jhinch
Copy link
Author

@jhinch jhinch commented Sep 26, 2017

Apologies. I didn't see your previous comment. I have signed the CLA now and resolved the merge conflicts

Postgres can deadlock with a pending pg_advisory_lock and
a long running CREATE INDEX CONCURRENTLY statement.

* Reproduce the deadlock in PostgreSQLConcurrentMigrationMediumTest
  with a modified version of the regular ConcurrentMigrationMediumTest
* Modify PostgreSQLAdvisoryLockTemplate to spin until
  pg_try_advisory_lock returns true or it is interrupted
* Sleep for 100ms on failed attempt to acquire the advisory lock
@jhinch
Copy link
Author

@jhinch jhinch commented Sep 26, 2017

The build appears to be failing even after rebasing onto the commit for the latest green build. It seems like the same tests are failing on master.

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Nov 15, 2017

Thanks for contributing this. Your code has been integrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.