Project

Profile

Help

Issue #1395

By default, all our MongoEngine QuerySets cache query results

Added by jcline@redhat.com over 5 years ago. Updated about 2 years ago.

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

Description

This problem is found in all our QuerySet usage, but falls into two distinct categories:

  1. The QuerySets from our models.
  2. The custom QuerySets we have.

The solution is to ensure that all our models use the QuerySetNoCache class rather than the QuerySet class, and that our custom QuerySets inherit from QuerySetNoCache. Finally, we should remove all uses of ``no_cache()`` in our current code.


Checklist

Associated revisions

Revision 5a361a8c View on GitHub
Added by Jeremy Cline over 5 years ago

Change all QuerySet objects to be QuerySetNoCache objects.

In order to not cache query results by default, all models must use QuerySet objects that are subclasses of QuerySetNoCache. This modifies all our models that don't have custom QuerySet objects to use the QuerySetNoCache by default (by inheriting from AutoRetryDocument) and introduces a superclass for all custom QuerySet classes to use which derives from QuerySetNoCache.

closes #1395

Revision 5a361a8c View on GitHub
Added by Jeremy Cline over 5 years ago

Change all QuerySet objects to be QuerySetNoCache objects.

In order to not cache query results by default, all models must use QuerySet objects that are subclasses of QuerySetNoCache. This modifies all our models that don't have custom QuerySet objects to use the QuerySetNoCache by default (by inheriting from AutoRetryDocument) and introduces a superclass for all custom QuerySet classes to use which derives from QuerySetNoCache.

closes #1395

History

#1 Updated by jcline@redhat.com over 5 years ago

  • Status changed from NEW to POST
  • Assignee set to jcline@redhat.com

#2 Updated by jortel@redhat.com over 5 years ago

  • Triaged changed from No to Yes

#3 Updated by jortel@redhat.com over 5 years ago

You Da Man! - triage team

#4 Updated by jcline@redhat.com over 5 years ago

  • Checklist item Change AutoRetryDocument to have QuerySetNoCache by default set to Done
  • Checklist item Change the custom QuerySets to inherit from QuerySetNoCache set to Done
  • Checklist item Remove all occurances of ``no_cache()`` set to Done

#6 Updated by rbarlow over 5 years ago

  • Status changed from POST to 5
  • Platform Release set to 2.8.0

#7 Updated by dkliban@redhat.com about 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#8 Updated by bmbouter about 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF