[SERVER-32624] dropDatabase() should wait for collection drops using ReplicationCoordinator::awaitReplication() instead of awaitReplicationOfLastOpForClient() Created: 09/Jan/18  Updated: 30/Oct/23  Resolved: 10/Jan/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.6.3, 3.7.1

Type: Bug 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

Issue Links:
Backports
Depends
Related
is related to SERVER-32284 awaitReplication can hang when the op... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 0

 Description   

dropDatabase currently uses both ReplicationCoordinator::awaitReplication() and awaitReplicationOfLastOpForClient() when waiting for collection drops to complete depending the state of the collections in the database at command invocation. We should be unifying these two code paths and use awaitReplication() with an explicit optime. awaitReplicationOfLastOpForClient() also has the unnecessary effect of waiting for the current snapshot which is not necessary for dropDatabase because we are only interested in waiting for the drop pending collection reaper, which is triggered by the commit optime advancing, to complete its work.



 Comments   
Comment by Githook User [ 11/Jan/18 ]

Author:

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

Message: SERVER-32624 clean up awaitReplication logic in dropDatabase()

(cherry picked from commit ba1d0d901ef386310457b03eecf9f5c4afce9047)
Branch: v3.6
https://github.com/mongodb/mongo/commit/eed88312a95e199f07826f4e8f48e5461c4bf900

Comment by Githook User [ 11/Jan/18 ]

Author:

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

Message: SERVER-32624 dropDatabase() waits for collection drops using ReplicationCoordinator::awaitReplication() instead of awaitReplicationOfLastOpForClient()

(cherry picked from commit 256dcb71d9b2f0110bc65b377f30f9ab4b24ef83)
Branch: v3.6
https://github.com/mongodb/mongo/commit/ca3e5f5c605d4dc720f2a55a8737b4b38fe1f3e5

Comment by Githook User [ 10/Jan/18 ]

Author:

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

Message: SERVER-32624 clean up awaitReplication logic in dropDatabase()
Branch: master
https://github.com/mongodb/mongo/commit/ba1d0d901ef386310457b03eecf9f5c4afce9047

Comment by Githook User [ 10/Jan/18 ]

Author:

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

Message: SERVER-32624 dropDatabase() waits for collection drops using ReplicationCoordinator::awaitReplication() instead of awaitReplicationOfLastOpForClient()
Branch: master
https://github.com/mongodb/mongo/commit/256dcb71d9b2f0110bc65b377f30f9ab4b24ef83

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