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

prevent database deadlocks #6846 #6865 #7020 #7030

Closed
wants to merge 3 commits into from

Conversation

pdurbin
Copy link
Member

@pdurbin pdurbin commented Jun 26, 2020

What this PR does / why we need it:

The pull request adds a sleep in the code leading up to UPDATE DVOBJECT SET INDEXTIME which sometimes leads to database deadlocks, especially when the full API test suite is run. The sleep is added to the onSuccess method of the FinalizeDatasetPublicationCommand.

Which issue(s) this PR closes:

Closes #6846 Test Failing
Closes #6865 Internal Exception: org.postgresql.util.PSQLException: ERROR: deadlock detected
Closes #7020 Get API test suite passing 😴 😴 😴

Special notes for your reviewer:

  • The 3 second sleep is hard coded.
  • On a test run it now takes 6:16 min to execute the test suite. On develop on the same box it took 4:21 min.

Suggestions on how to test this:

Deploy the branch. See if the 3 second sleep is bothersome during normal user operations.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No.

Is there a release notes update needed for this change?:

No.

Additional documentation:

None.

@coveralls
Copy link

coveralls commented Jun 26, 2020

Coverage Status

Coverage decreased (-0.0008%) to 19.652% when pulling a3b3b2c on 7020-finalpub-sleep into c5c2236 on develop.

@sekmiller sekmiller assigned sekmiller and unassigned sekmiller Jun 29, 2020
@pdurbin
Copy link
Member Author

pdurbin commented Jul 8, 2020

At tech hours yesterday we talked about a new lead that the deadlock may happen between setting the index time and setting the permission time. Closing. People should keep an eye on #6865.

@pdurbin pdurbin closed this Jul 8, 2020
@scolapasta
Copy link
Contributor

As an added comment, we did spin this one up, and as expected, there were still deadlocks.

(i.e. I was about to close, since I hadn't seen @pdurbin already do that)

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