[SERVER-75309] Spurious warning message in Windows SemaphoreTicketHolder::_tryAcquire Created: 27/Mar/23  Updated: 29/Oct/23  Resolved: 29/Mar/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

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

Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2023-04-03
Participants:

 Description   

In the Windows version of SemaphoreTicketHolder::_tryAcquire, if _numTickets is less than 0 we print an ominous-sounding message "DISASTER! in TicketHolder" to std::cerr. However, since resizing the ticket holder simply adjusts _numTickets, it doesn't seem incorrect for _numTickets to be less than 0 if the ticket holder gets resized to a smaller size while the number of available tickets is low.



 Comments   
Comment by Githook User [ 29/Mar/23 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-75309 Remove spurious warning in `SemaphoreTicketHolder` on Windows
Branch: master
https://github.com/mongodb/mongo/commit/a5ce40e99dbbf3bdb5429eba88abc6b0406a9ccd

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