Project

Profile

Help

Story #3226

Story #3209: As a user, I have Repository Versions

As a user, I am guaranteed that my incomplete repository versions are cleaned up after a crash

Added by dkliban@redhat.com almost 2 years ago. Updated 20 days ago.

Status:
MODIFIED
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 32

Description

Motivation

A RepositoryVersion that has complete=False and experiences an error will be deleted by core, then exception will be reraised, and the user will see the exception in the task failure. In the event of a crash though, we have no mechanism to clean up the incomplete RepositoryVersion. This would be an area of improvement.

Design

Storing crash info for cleanup later

The created_resources field stores a reference to the created RepositoryVersion. Any time a RepositoryVersion is created, it needs to be saved as a created_resources object in the same transaction.

Cleaning up

Update the task cleanup code to delete any task.created_resources.filter(complete=False)

That worker already holds the necessary locks to make this operation safe so it just needs to make sure to perform the deletions before deleting the corresponding ReservedResource records.

created_resources only show resources with completed=True

A saved reference in created_resources is only visible on the Task's viewset or filterset if completed=True.

clipboard-201910011012-yaijt.png (829 Bytes) aladanh, 10/01/2019 05:12 AM clipboard-201910011012-yaijt.png
clipboard-201910011012-zyh0e.png (834 Bytes) aladanh, 10/01/2019 05:12 AM clipboard-201910011012-zyh0e.png
clipboard-201910011012-akln5.png (873 Bytes) aladanh, 10/01/2019 05:12 AM clipboard-201910011012-akln5.png
250
250
250

Checklist


Related issues

Blocked by Pulp - Task #3222: Add 'complete' attribute to the RepositoryVersion model MODIFIED Actions

Associated revisions

Revision ef428607 View on GitHub
Added by jortel@redhat.com over 1 year ago

Clean up incomplete created-resources.
closes #3226

Revision ef428607 View on GitHub
Added by jortel@redhat.com over 1 year ago

Clean up incomplete created-resources.
closes #3226

Revision ef428607 View on GitHub
Added by jortel@redhat.com over 1 year ago

Clean up incomplete created-resources.
closes #3226

History

#1 Updated by dkliban@redhat.com almost 2 years ago

  • Parent task set to #3209

#2 Updated by bmbouter almost 2 years ago

  • Description updated (diff)

Rewriting based on recent discussion on the list.

#3 Updated by bmbouter almost 2 years ago

  • Description updated (diff)

#4 Updated by daviddavis almost 2 years ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#5 Updated by dkliban@redhat.com almost 2 years ago

  • Blocked by Task #3222: Add 'complete' attribute to the RepositoryVersion model added

#6 Updated by bmbouter almost 2 years ago

  • Description updated (diff)

Rewriting after discussion on the design w/ other core devs

#7 Updated by dkliban@redhat.com almost 2 years ago

  • Sprint/Milestone set to 53

#8 Updated by daviddavis almost 2 years ago

I think we need to also handle the case where the task has failed and has already been cleaned up (removed). We should therefore probably remove repo versions that have no task associated (via created_resources) and are complete=False.

Added a checklist item for this case.

#9 Updated by daviddavis almost 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#10 Updated by daviddavis over 1 year ago

  • Status changed from ASSIGNED to NEW
  • Assignee deleted (daviddavis)

I'm on vacation. Will pick this back up on Jan 29th if someone doesn't beat me to it.

#11 Updated by jortel@redhat.com over 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com

#12 Updated by jortel@redhat.com over 1 year ago

wrote:

I think we need to also handle the case where the task has failed and has already been cleaned up (removed). We should therefore probably remove repo versions that have no task associated (via created_resources) and are complete=False.

Added a checklist item for this case.

If the CreatedResource.task=NULL, how can it be determined that the task failed?

#13 Updated by jortel@redhat.com over 1 year ago

  • Sprint/Milestone changed from 53 to 54

#14 Updated by jortel@redhat.com over 1 year ago

  • Status changed from ASSIGNED to POST

#15 Updated by jortel@redhat.com over 1 year ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#16 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 32

#17 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (54)

#18 Updated by dkliban@redhat.com over 1 year ago

  • Sprint/Milestone set to 3.0

#19 Updated by minafiscs55 7 months ago

It's possible. Luckily, I 've found this web.
[[http://impossiblegame.co]]

#20 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)

#21 Updated by Ronn91 about 2 months ago

[[https://super-smashflash2.com/]] is actually improved and designed as a completely new version and independent to the original version. Through a lot of improvement and update, Super Smash Flash 2 versions is currently released up to v.09b with perfect and more attractive features, helping the players play in full-screen mode and be able to fight against online opponents via a proprietary network system of McLeodGaming.

Please register to edit this issue

Also available in: Atom PDF