Project

Profile

Help

Issue #6534

closed

Having same content in one batch can cause issues in _post_save of ContentSaver

Added by ttereshc about 4 years ago. Updated over 3 years ago.

Status:
CLOSED - WONTFIX
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

ContentSaver lets the duplicated content from one batch to be processed in the _post_save. It can cause issues, I'm not sure if duplicates bring any benefit.

Imagine 2 same content units in one batch. According to the code here:

  • first declarative content is fully processed
  • second declarative content falls under IntegrityError, it now has the same content associated with it, and further processing of this stage is not happening BUT...
  • ... the whole batch (2 declarative content units) is then getting processed by the _post_save

The purpose of the _post_save method (to my understanding) is to perform some additional actions, usually db operations, to make a piece of content complete or perform something essential after each content is saved.

Currently, in RPM plugin we run into the issue that those essential operations are performed twice for a content unit if there are 2 same content units in a batch. This is an undesirable behaviour.

It can be fixed in each plugin in a _post_save if they have it, or maybe it's worth fixing it in the stages in pulpcore.

Actions #1

Updated by fao89 about 4 years ago

  • Triaged changed from No to Yes
Actions #2

Updated by dkliban@redhat.com over 3 years ago

  • Status changed from NEW to CLOSED - WONTFIX

We will not fix this in the near future. Let's revisit when we have time.

Also available in: Atom PDF