[SERVER-80974] Unclean shutdown while dropping local.* collection and indexes can make the catalog inconsistent Created: 12/Sep/23  Updated: 11/Dec/23  Resolved: 29/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.1, 7.2.0-rc0, 7.0.5, 6.0.13, 5.0.24

Type: Bug Priority: Major - P3
Reporter: Jordi Olivares Provencio Assignee: Jordi Olivares Provencio
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-82625 create_indexes_waits_for_already_in_p... Closed
Duplicate
is duplicated by SERVER-79245 Unclean shutdown while dropping colle... Closed
is duplicated by SERVER-81355 Unclean shutdown after untimestamped ... Closed
is duplicated by SERVER-81879 startupRecoveryForRestore can drop ta... Closed
Problem/Incident
Related
related to SERVER-81373 Refactor DeferredDropRecordStore to u... Open
related to SERVER-83175 Rethink MissingIndexIdent tests Backlog
is related to SERVER-79245 Unclean shutdown while dropping colle... Closed
Assigned Teams:
Storage Execution EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0, v6.0, v5.0, v4.4
Sprint: Execution EMEA Team 2023-10-02
Participants:
Linked BF Score: 144

 Description   

Writes to the local namespace use logged tables since they are not replicated. In a replica set writes to the catalog follow the WT timestamp model to support point-in-time reads.

If a local collection is dropped, it is thus dropped immediately without going through the ident reaper.

As a result, if a crash were to happen after dropping an index table AND before the catalog has checkpointed, the server will crash in the same fashion as SERVER-79245.



 Comments   
Comment by Githook User [ 11/Dec/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-80974 Defer untimestamped drops until the catalog is checkpointed

SERVER-67766 Log index and collection successful drop
SERVER-72683 use default timeout when waiting for empty directory removal
SERVER-81606 Exclude untimestamped catalog writes test from in-memory variants
SERVER-69735 Increase timeout in directoryperdb.js to wait for foo to be removed

GitOrigin-RevId: ce215fe83acfde4e5d1b80f5f20772b4e509d5d2
Branch: v5.0
https://github.com/mongodb/mongo/commit/f9bf0cdff852c396eb753467934fa655c47f505d

Comment by Githook User [ 14/Nov/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-80974 Defer untimestamped drops until the catalog is checkpointed

SERVER-67766 Log index and collection successful drop
SERVER-72683 use default timeout when waiting for empty directory removal
Branch: v6.0
https://github.com/mongodb/mongo/commit/d0102442998ec8e81ecdf28164f363a010e0e98c

Comment by Githook User [ 13/Nov/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-80974 Defer untimestamped drops until the catalog is checkpointed
Branch: v7.0
https://github.com/mongodb/mongo/commit/35b87cc2640691c67255c6eae38d10654d05b10b

Comment by Githook User [ 07/Nov/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-80974 Defer untimestamped drops until the catalog is checkpointed
Branch: v7.1
https://github.com/mongodb/mongo/commit/1339ea1cb7e244f8e1bd800fcf51a1f44e9dfa58

Comment by Louis Williams [ 11/Oct/23 ]

Requesting backports because the bug fix also implemented code to significantly reduce log spam that is caused by SERVER-74033.

Comment by Githook User [ 29/Sep/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-80974 Defer untimestamped drops until the catalog is checkpointed
Branch: master
https://github.com/mongodb/mongo/commit/21e6842bf3a7ab0ea054798230ac5687b0c92a7e

Generated at Thu Feb 08 06:45:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.