[SERVER-28696] replication_coordinator_impl_elect_v1_test.cpp tests need to ensure they have global lock before calling canAcceptWritesForDatabase Created: 07/Apr/17  Updated: 06/Dec/17  Resolved: 04/May/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.5.7

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-05-08
Participants:
Linked BF Score: 0

 Description   

Several unit tests call canAcceptWritesForDatabase after attempting to take the global IX lock with a 1 millisecond timeout. If the global lock acquisition failed, then the call to canAcceptWritesForDatabase will trigger an invariant.

I think we should just remove the 1ms lock acquisition timeout and make the test wait unconditionally for the lock.



 Comments   
Comment by Githook User [ 04/May/17 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-28696 Ensure global lock is fully acquired in replication_coordinator_impl_elect_v1_test
Branch: master
https://github.com/mongodb/mongo/commit/6512607ffdb9c7fbe4b28c6a6b146d3bc71f7856

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