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

Persist records before uploading to s3 #1723

Merged
merged 2 commits into from
Jun 25, 2018

Commits on Jun 25, 2018

  1. Persist records before uploading to s3

    When same gem version is pushed in parallel, upload to s3 is run for
    both the process. Process which commits trancation in
    Rubygems#update_attributes_from_gem_specification! first gets to set
    version.sha256, while process which uploads to s3 last gets to write
    gem file. These two processes need not be same and hence lead of sha
    mismatch.
    If we persist version record before uploading to s3, other processes
    will get record not unique violation and not overwrite gem file in s3.
    sonalkr132 committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    b65aeda View commit details
    Browse the repository at this point in the history
  2. Test parallel push doesn't lead mismatched sha

    transactional_test is set to false because general test flow doesn't
    clear records created in Thread.new which use different db connection.
    sonalkr132 committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    f9aa63c View commit details
    Browse the repository at this point in the history