Skip to content

Commit 24b1244

Browse files
committed
Merge branch 'cherry-pick-7664a30f' into 'master_7.1.x'
CP V7.1 - Bug #15571: Remove old dropIndex commands. See merge request vitam/vitam!10924 (cherry picked from commit 7664a30f717dfa6840f8b0901082447529b4369c) c707cff5 Bug #15571: Remove old dropIndex commands. Co-authored-by: Julien Georges <julien.georges@culture.gouv.fr> See merge request vitam/vitam!10925
2 parents 2734b72 + f02c594 commit 24b1244

File tree

8 files changed

+0
-56
lines changed

8 files changed

+0
-56
lines changed

deployment/ansible-vitam/roles/mongo_configure/templates/mongo-data/init-collect-database.js.j2

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,3 @@ db.Transaction.createIndex({
1515
"_tenant": 1,
1616
"ProjectId": 1
1717
});
18-
19-
// Migration : remove Indexes
20-
21-
db.Project.dropIndex({
22-
"Context.MessageIdentifier": 1,
23-
"Context.SubmissionAgencyIdentifier": 1,
24-
"Context.ArchivalAgencyIdentifier": 1
25-
});

deployment/ansible-vitam/roles/mongo_configure/templates/mongo-data/init-identity-database.js.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Switch to identity database
32
db = db.getSiblingDB('identity')
43

deployment/ansible-vitam/roles/mongo_configure/templates/mongo-data/init-logbook-database.js.j2

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,3 @@ db.LogbookLifeCycleUnitInProcess.createIndex( { "_tenant": 1, "_lastPersistedDat
2020
// Required for object group lifecycle traceability (select by _lastPersistedDate && _tenant, order by _lastPersistedDate via index prefix)
2121
db.LogbookLifeCycleObjectGroup.createIndex( { "_tenant": 1, "_lastPersistedDate": 1 })
2222
db.LogbookLifeCycleObjectGroupInProcess.createIndex( { "_tenant": 1, "_lastPersistedDate": 1 })
23-
24-
// Drop obsolete indexes, if any (they where required for traceability at some point because of an bug that no longer exists)
25-
db.LogbookLifeCycleUnit.dropIndex( { "evDateTime" : 1} )
26-
db.LogbookLifeCycleObjectGroup.dropIndex( { "evDateTime" : 1} )
27-
db.LogbookLifeCycleUnit.dropIndex( { "_tenant" : 1 , "obId" : 1 } )
28-
db.LogbookLifeCycleObjectGroup.dropIndex( { "_tenant" : 1 , "obId" : 1 } )
29-
db.LogbookLifeCycleUnit.dropIndex( { "_tenant" : 1 , "events.evIdProc" : 1 } )
30-
db.LogbookLifeCycleObjectGroup.dropIndex( { "_tenant" : 1 , "events.evIdProc" : 1 } )
31-
db.LogbookLifeCycleUnit.dropIndex( { "_lastPersistedDate": 1, "_tenant": 1 })
32-
db.LogbookLifeCycleObjectGroup.dropIndex( { "_lastPersistedDate": 1, "_tenant": 1 })

deployment/ansible-vitam/roles/mongo_configure/templates/mongo-data/init-masterdata-database.js.j2

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ db.AccessionRegisterDetail.createIndex( { "Opc" : 1 } )
2525
db.AccessionRegisterDetail.createIndex( { "Opi" : 1 } )
2626
db.AccessionRegisterDetail.createIndex( { "OriginatingAgency" : 1, "Opi" : 1, "_tenant" : 1} , { unique: true } )
2727

28-
// [Migration R7 -> R8] Drop R6 and R7 AccessionRegisterDetail indexes
29-
db.AccessionRegisterDetail.dropIndex( { "OriginatingAgency" : 1, "Identifier" : 1, "_tenant" : 1} )
30-
3128
db.IngestContract.createIndex( { "_tenant" : 1 , "Identifier" : 1 } , { unique: true } )
3229

3330
db.AccessContract.createIndex( { "_tenant" : 1 , "Identifier" : 1 } , { unique: true } )
@@ -53,4 +50,3 @@ db.PreservationScenario.createIndex( { "_tenant" : 1 , "Identifier" : 1 } , { un
5350
db.ManagementContract.createIndex( { "_tenant" : 1 , "Identifier" : 1 } , { unique: true } )
5451

5552
db.Schema.createIndex( { "_tenant" : 1 , "Path" : 1, "Collections" : 1 } , { unique: true } )
56-

deployment/ansible-vitam/roles/mongo_configure/templates/mongo-data/init-metadata-collect-database.js.j2

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Switch to metadataCollect database
32
db = db.getSiblingDB('metadataCollect')
43

@@ -12,6 +11,3 @@ db.Unit.createIndex( { "_glpd" : 1 } )
1211
db.ObjectGroup.createIndex( { "_tenant" : 1 } )
1312
db.ObjectGroup.createIndex( { "_ops" : 1 } )
1413
db.ObjectGroup.createIndex( { "_glpd" : 1 } )
15-
16-
17-
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Switch to metadata database
32
db = db.getSiblingDB('metadata')
43

@@ -15,19 +14,5 @@ db.ObjectGroup.createIndex( { "_glpd" : 1 } )
1514

1615
db.Snapshot.createIndex( { "_tenant" : 1, "Name" : 1 } , { unique: true } )
1716

18-
// Drop R6 indexes, if any
19-
20-
db.Unit.dropIndex( { "_id" : 1 , "_tenant" : 1 } )
21-
db.Unit.dropIndex( { "_id" : 1 , "_tenant" : 1 , "_us" : 1 } )
22-
db.Unit.dropIndex( { "_id" : 1 , "_tenant" : 1 , "_up" : 1 } )
23-
db.Unit.dropIndex( { "_id" : 1 , "_tenant" : 1 , "_uds" : 1 } )
24-
db.Unit.dropIndex( { "_id" : 1 , "_tenant" : 1 , "_v" : 1 } )
25-
db.Unit.dropIndex( { "_id" : 1 , "_tenant" : 1 , "_og" : 1 , "_us" : 1 } )
26-
27-
db.ObjectGroup.dropIndex( { "_id" : 1 , "_tenant" : 1 } )
28-
db.ObjectGroup.dropIndex( { "_id" : 1 , "_tenant" : 1 , "_us" : 1 } )
29-
db.ObjectGroup.dropIndex( { "_id" : 1 , "_tenant" : 1 , "_up" : 1 } )
30-
db.ObjectGroup.dropIndex( { "_id" : 1 , "_tenant" : 1 , "_v" : 1 } )
31-
3217
// create index
3318
db.PurgedPersistentIdentifier.createIndex( { "_tenant" : 1, "persistentIdentifier.PersistentIdentifierContent" : 1 } , { unique: false } )

deployment/ansible-vitam/roles/mongo_configure/templates/mongo-data/init-report-database.js.j2

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ db = db.getSiblingDB('report')
44
// Create indexes EliminationActionUnit
55
db.EliminationActionUnit.createIndex( { "processId" : 1, "_tenant" : 1 } )
66
db.EliminationActionUnit.createIndex( { "processId" : 1, "_tenant" : 1, "_metadata.id" : 1, "_metadata.type": 1 } )
7-
db.EliminationActionUnit.dropIndex( { "processId" : 1, "_tenant" : 1, "_metadata.status" : 1 } )
8-
db.EliminationActionUnit.dropIndex( { "processId" : 1, "_tenant" : 1, "_metadata.id" : 1 } )
97

108
// Drop obsolete EliminationActionObjectGroup
119
db.EliminationActionObjectGroup.drop();
@@ -26,7 +24,6 @@ db.TransferReplyUnit.createIndex( { "processId" : 1, "_tenant" : 1, "_metadata.i
2624
// Create indexes PreservationReport
2725
db.PreservationReport.createIndex({"processId" : 1, "_tenant" : 1})
2826
db.PreservationReport.createIndex({"processId" : 1, "_tenant" : 1, "status" : 1 })
29-
db.PreservationReport.dropIndex({"processId" : 1, "_tenant" : 1, "id" : 1 })
3027

3128
// Create indexes AuditObjectGroup
3229
db.AuditObjectGroup.createIndex( { "processId" : 1, "_tenant" : 1 } )
@@ -36,7 +33,6 @@ db.AuditObjectGroup.createIndex( { "processId" : 1, "_tenant" : 1, "_metadata.st
3633
// Create indexes InvalidUnits (Computed inherited rules invalidation)
3734
db.InvalidUnits.createIndex( { "processId" : 1, "_tenant" : 1 } )
3835
db.InvalidUnits.createIndex( { "processId" : 1, "_tenant" : 1, "_metadata.id" : 1 } )
39-
db.InvalidUnits.dropIndex( { "processId" : 1} )
4036

4137
// Create indexes EvidenceAuditReport
4238
db.EvidenceAuditReport.createIndex( { "processId" : 1, "_tenant" : 1 } )
@@ -45,11 +41,9 @@ db.EvidenceAuditReport.createIndex( { "processId" : 1, "_tenant" : 1, "_metadata
4541

4642
// Create indexes ExtractedMetadata
4743
db.ExtractedMetadata.createIndex( { "processId" : 1, "tenant" : 1 } )
48-
db.ExtractedMetadata.dropIndex( { "processId" : 1, "tenant" : 1, "id" : 1 } )
4944

5045
// Create indexes BulkUpdateUnitMetadataReport
5146
db.BulkUpdateUnitMetadataReport.createIndex( { "processId" : 1, "_tenant" : 1, "statusId" : 1 } )
52-
db.BulkUpdateUnitMetadataReport.dropIndex( { "processId" : 1, "_tenant" : 1, "id" : 1 } )
5347

5448
// Create indexes DeleteGotVersionsReport
5549
db.DeleteGotVersionsReport.createIndex( { "processId" : 1, "_tenant" : 1 } )

deployment/ansible-vitam/roles/mongo_configure/templates/mongo-offer/init-offer-database.js.j2

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,3 @@ db = db.getSiblingDB('offer')
66
db.OfferLog.createIndex( { "Container" : 1, "Sequence" : 1, "Time": -1 } )
77
db.CompactedOfferLog.createIndex( { "Container" : 1, "SequenceStart" : -1 } )
88
db.CompactedOfferLog.createIndex( { "Container" : 1, "SequenceEnd" : 1 } )
9-
10-
// Drop old indexes
11-
db.OfferLog.dropIndex( { "container" : 1} )
12-
db.OfferLog.dropIndex( { "Container" : 1} )
13-
db.CompactedOfferLog.dropIndex( { "Container": 1, "SequenceStart": 1, "SequenceEnd": -1 } )
14-
15-
// For migration
16-
db.OfferLog.dropIndex( { "Container" : 1, "Sequence" : 1 } )

0 commit comments

Comments
 (0)