[SERVER-38800] fix collection counts in rollback without rebuilding indexes Created: 31/Dec/18  Updated: 29/Oct/23  Resolved: 10/Jan/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.1.7

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2019-01-14
Participants:

 Description   

Starting in SERVER-38769, rollback would not attempt to fix collection counts for drop-pending collections managed by the storage engine. This is because the drop-pending collection has been removed from the catalog while the underlying ident is kept around for rollback/recovery. The collection counts are eventually fixed coming out of rollback because rollback rebuilds the indexes on drop-pending collections in catalog::openCatalog().

Once SERVER-38548 is completed, dropping indexes will defer the corresponding ident drops in a similar manner to what's currently done for collections. We should look into an alternate means of reconciling collection counts during rollback if we cannot rely on index rebuilds.



 Comments   
Comment by Githook User [ 10/Jan/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-38800 rollback fixes collection counts using o2 fields of drop and rename oplog entries
Branch: master
https://github.com/mongodb/mongo/commit/8e5ec90e11d30d476f510929dfeeb2e7d461383e

Comment by Githook User [ 09/Jan/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-38800 add collection count to o2 field of collection drop and rename oplog entries

This applies only to the case where the target collection is dropped during the rename
operation.
Branch: master
https://github.com/mongodb/mongo/commit/627853bdc19ed147fe5c14e9e458035598c062ea

Comment by Githook User [ 09/Jan/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-38800 add test cases to rollback_wt_drop.js

rollback rename with drop target
collection drop without any CRUD ops to undo
rollback both creation and drop for the same collection
Branch: master
https://github.com/mongodb/mongo/commit/5d0f13334445fca6e2c5bfc496b5d5b1cb7e0f8a

Comment by Githook User [ 09/Jan/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-38800 ReplSetTest.dumpOplog() returns oplog entries in an array after logging the values
Branch: master
https://github.com/mongodb/mongo/commit/fca97b04fc5e1ea0e29548f11425845a566fcebe

Comment by Githook User [ 08/Jan/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-38800 OpObserver accepts numRecords for drop and rename operations
Branch: master
https://github.com/mongodb/mongo/commit/ecf269ff6494930ae4dfa98f66c4cbd6335cede2

Comment by Githook User [ 04/Jan/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-38800 defer ident drop for _id index if storage engine supports drop-pending idents
Branch: master
https://github.com/mongodb/mongo/commit/bd209676619a5395f849bd75334aa378527d2181

Comment by Githook User [ 04/Jan/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-38800 rollback falls back on collection scan to reset collection count if drop-pending collection count is not available
Branch: master
https://github.com/mongodb/mongo/commit/266891b0d48fd3376c416b4cb66badcf58e5dda4

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