Bug #10022

AIP re-ingest causing incorrect file count in Archival Storage

Added by Sarah Romkey almost 6 years ago. Updated almost 6 years ago.

Status:VerifiedStart date:06/14/2016
Priority:MediumDue date:
Assignee:Sarah Romkey% Done:


Category:AIP Management
Target version:Release 1.5.1
Google Code Legacy ID: Pull Request:
Sponsored:No Requires documentation:


To reproduce:

- reingest an AIP (first take note of the number of files in the AIP- click on Search Archival Storage to show the file count column)

- After re-storing the AIP, the file count will be twice the original file count

For example, if your AIP has 9 files, after re-ingest the file count will show 18 files.

This may be due to an error in the elasticsearch index.


#1 Updated by Holly Becker almost 6 years ago

  • Status changed from New to Feedback
  • Assignee set to Sarah Romkey

This is an error in Elasticsearch indexing - when we reingest, we don't delete the information for the previous files. This is fixed in the full reingest feature which is scheduled for 1.6, but can be back-ported to 1.5.1 if we decide to do a point release.

diff --git a/src/MCPClient/lib/clientScripts/indexAIP.py b/src/MCPClient/lib/clientScripts/indexAIP.py
index aff798a..8b0eb65 100755
--- a/src/MCPClient/lib/clientScripts/indexAIP.py
+++ b/src/MCPClient/lib/clientScripts/indexAIP.py
@@ -73,8 +73,9 @@ def index_aip():
     print('Indexing AIP info')
     # Delete ES index before creating new one if reingesting
     if 'REIN' in sip_type:
+        print('Deleting outdated entry for AIP and AIP files with UUID', sip_uuid, 'from archival storage')
         elasticSearchFunctions.delete_aip(client, sip_uuid)
-        print('Deleted outdated entry for AIP with UUID', sip_uuid, ' from archival storage')
+        elasticSearchFunctions.delete_aip_files(client, sip_uuid)

     # Index AIP

#2 Updated by Holly Becker almost 6 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from Sarah Romkey to Nick Wilkinson

#3 Updated by Nick Wilkinson almost 6 years ago

  • Assignee changed from Nick Wilkinson to Jesús García Crespo

Hi Jesús, assigning to you for CR.

#4 Updated by Jesús García Crespo almost 6 years ago

  • Status changed from Code Review to In progress
  • Assignee changed from Jesús García Crespo to Holly Becker


#5 Updated by Holly Becker almost 6 years ago

  • Status changed from In progress to QA/Review
  • Assignee changed from Holly Becker to Sarah Romkey

Merged into stable/1.5.x

#6 Updated by Sarah Romkey almost 6 years ago

  • Status changed from QA/Review to Verified

Awesome! I re-ingested a test AIP twice and the file count is correct.

Also available in: Atom PDF