Project

Profile

Help

Issue #8044

closed

no index for _last_updated on content models causes a fatal error when ordered result is queried

Added by ttereshc almost 4 years ago. Updated almost 4 years ago.

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

Description

To ensure data correctness, Migration plugin requires fetching content in ordered way. For this _last_updated field is used.

Without index, the query ordered by that field fails due to lack of memory and complains that no index is present.


Related issues

Related to Migration Plugin - Issue #7781: In case of any issues in the middle of pre-migration, migration re-run doesn't pick up all the needed content.CLOSED - CURRENTRELEASEggaineyActions
Actions #2

Updated by ttereshc almost 4 years ago

  • Related to Issue #7781: In case of any issues in the middle of pre-migration, migration re-run doesn't pick up all the needed content. added
Actions #3

Updated by ggainey almost 4 years ago

Example:

> db.units_rpm.find().sort( { _last_updated: -1 } )                                          
Error: error: {                                                                              
        "ok" : 0,                                                                            
        "errmsg" : "Executor error during find command: OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.",
        "code" : 96,                                                                         
        "codeName" : "OperationFailed"                                                       
}    
Actions #4

Updated by ggainey almost 4 years ago

Performance note: adding index (last_updated, -1) to all units collections, in an installation with 274 sync'd repositories comprising 259738 RPMs, took 4m30s to complete.

Actions #5

Updated by fao89 almost 4 years ago

  • Triaged changed from No to Yes
Actions #6

Updated by ggainey almost 4 years ago

  • Status changed from ASSIGNED to POST

Added by ggainey almost 4 years ago

Revision ca6c2737 | View on GitHub

Add index to _last_updated for ContentUnits.

fixes #8044

Actions #7

Updated by ggainey almost 4 years ago

  • Status changed from POST to MODIFIED

Added by ggainey almost 4 years ago

Revision a82ade16 | View on GitHub

Add index to _last_updated for ContentUnits.

fixes #8044

(cherry picked from commit ca6c2737afeced9d9853d23133a0c68cd60c6a64)

Actions #8

Updated by ggainey almost 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF