Project

Profile

Help

Issue #8989

closed

Ensure on_demand content finishes saving before request completes

Added by gerrod almost 3 years ago. Updated over 2 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Ticket moved to GitHub: "pulp/pulpcore/2022":https://github.com/pulp/pulpcore/issues/2022


With #8980 a race condition was found from a client requesting on_demand content and closing the connection after downloading the content before the artifact was finished being saved to the database. The fix in https://github.com/pulp/pulpcore/pull/1447 ensures that the async save task isn't canceled, but a race condition is still present if a client closes the connection before the save is complete and then requests the artifact from the database. They will see no artifact present despite the fact the artifact is still being saved. The timing for this race condition is pretty tight for most artifacts and probably won't be experienced in any normal workflows.

The solution to remove this race condition is to wait before sending the last_chunk for the StreamedResponse like this https://github.com/pulp/pulpcore/commit/cd76a36ae74f98bb19bebe29a0db3e0879010028. This change would require changes in other plugins that define their own Downloaders and it is possible this condition isn't prevalent enough to warrant the work.

Actions #1

Updated by dalley almost 3 years ago

  • Priority changed from Low to Normal
Actions #2

Updated by dkliban@redhat.com almost 3 years ago

  • Triaged changed from No to Yes
Actions #3

Updated by pulpbot over 2 years ago

  • Description updated (diff)
  • Status changed from NEW to CLOSED - DUPLICATE

Also available in: Atom PDF