[SERVER-61398] OperationContext::waitForConditionOrInterruptNoAssertUntil() is not returning stdx::cv_status::timeout on deadline expiration. Created: 11/Nov/21 Updated: 27/Oct/23 Resolved: 15/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Suganthi Mani | Assignee: | Backlog - Service Architecture |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Service Arch
|
| Operating System: | ALL |
| Participants: |
| Description |
|
On deadline expiration, OperationContext::waitForConditionOrInterruptNoAssertUntil() is not returning stdx::cv_status::timeout, instead it's returning stdx::cv_status::no_timeout. As a result, maybeWakeReason in waitForConditionOrInterruptUntil() is set to boost::none, leading to hang of waitForConditionOrInterruptUntil(). Note: Currently, sleepFor(), sleepUntil(), waitForConditionOrInterruptFor() internally calls waitForConditionOrInterruptUntil() and those methods are used in many places of our codebase. |
| Comments |
| Comment by Suganthi Mani [ 15/Nov/21 ] |
|
For tenant_migration_recipient_service_test.cpp unit test, the clock source used is ClockSourceMock. The expectation for ClockSourceMock is to advance the time explicitly to mock deadline expiration (i.e, to make alarm to throw stdx::cv_status::timeout, in-turn making OperationContext::waitForConditionOrInterruptNoAssertUntil() to return stdx::cv_status::timeout). So, marking this ticket as "Works as designed". P.S: (Sorry for the noise.) |