GlobalLocks with deadlines other than Date_t::max() can throw exceptions, but that behavior is not always expected by users, and requires an extra try-catch block. We should add a required argument to the GlobalLock constructor when passing deadlines other than Date_t::max() that allows GlobalLock::isLocked() to return false even if the operation context was interrupted.
Potential implementations include a) using an enum (LEAVE_UNLOCKED_ON_INTERRUPT, THROW_ON_INTERRUPT) or b) a lambda that users must use to implement the desired behavior when the lock is interrupted.
- is duplicated by
-
SERVER-33927 The NoopWriter is not resilient to `InterruptedAtShutdown` exception.
- Closed