[SERVER-36691] Only recover orphaned collection idents when starting with repair, not after an unclean shutdown Created: 15/Aug/18  Updated: 29/Oct/23  Resolved: 16/Aug/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.3

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: nyc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Storage NYC 2018-08-27
Participants:
Linked BF Score: 65

 Description   

SERVER-35696 made it possible to recover idents with no matching catalog entry as "orphans" in a special namespace, "local.system.orphan-collection-****. This change unintentionally used this behavior when starting from unclean shutdowns, not just when using --repair.

This means that in tests that do many rollbacks, hundreds of collections are created in the "local" database unnecessarily in routine, expected scenarios.

This code should be changed to include only _options.forRepair, not loadingFromUncleanShutdownOrRepair.



 Comments   
Comment by Githook User [ 14/Sep/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-36691 Only recover orphaned collection idents when starting with repair

(cherry picked from commit 598df2cc3e40bfe8d6e71971e3ab06f0619121a1)
Branch: v4.0
https://github.com/mongodb/mongo/commit/5447a9d6c580e693cbb14ae503c81d3168e79d17

Comment by Githook User [ 16/Aug/18 ]

Author:

{'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao'}

Message: SERVER-36691 Fix used result in kv_storage_engine_test
Branch: master
https://github.com/mongodb/mongo/commit/26a0591d1f618ce59ffbc58a12a0ca86e24a3127

Comment by Githook User [ 16/Aug/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-36691 Only recover orphaned collection idents when starting with repair
Branch: master
https://github.com/mongodb/mongo/commit/598df2cc3e40bfe8d6e71971e3ab06f0619121a1

Generated at Thu Feb 08 04:43:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.