summaryrefslogtreecommitdiff
path: root/src/mongo/db/operation_context_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-76634 Add SerializationContext object to ExpressionContextHugh Tong2023-05-151-2/+5
|
* SERVER-71123 implement IWYU tool and add required human changesDaniel Moody2023-05-111-1/+1
|
* SERVER-74241 remove SessionHandle and similar aliasesMatt Diener2023-02-241-2/+2
|
* SERVER-71440 Remove OpCtx::setIgnoreInterruptsExceptForReplStateChangeSteve Tarzia2023-01-271-68/+0
|
* SERVER-70361 Prevent crash due to duration overflow in ↵Blake Oler2022-10-201-2/+16
| | | | waitForConditionOrInterruptNoAssertUntil()
* SERVER-68214 move session_catalog*, session*, logical_session* to ↵Shin Yee Tan2022-08-171-1/+1
| | | | mongo/db/session directory
* SERVER-49864 Changed tests to use ServiceContextTest so getServiceContext ↵Alex Li2022-06-281-74/+70
| | | | can be used
* SERVER-66203 move MONGO_LOGV2_DEFAULT_COMPONENT defs below includesBilly Donahue2022-05-061-1/+3
|
* SERVER-64024 destroy the packaged_task on the thread it was createdBilly Donahue2022-03-011-199/+159
|
* SERVER-63143 Operation can be interrupted by maxTimeMS timeout while waiting ↵Matthew Russotto2022-02-101-0/+68
| | | | for lock even if _ignoreInterruptsExceptForReplStateChange is set
* SERVER-58403 Serialize concurrent accesses to OperationContext::_commentJennifer Peshansky2021-07-271-0/+2
|
* SERVER-53230: Rename cancelation -> cancellation everywhereTyler Seip2021-03-231-22/+22
|
* SERVER-50660 Integrate CancelationTokens with OperationContextMatthew Saltz2020-12-221-0/+81
|
* SERVER-49800 fix use-after-move violations in testsBenety Goh2020-08-011-1/+1
|
* SERVER-46962 Blacklist sync sources that are shutting downPavi Vetriselvan2020-06-261-0/+8
|
* SERVER-47802 Destroy opCtx after responding to clientsAmirsaman Memaripour2020-05-141-0/+83
| | | | | Postpone destruction of opCtx until after responding to clients to reduce the cost of destroying opCtx on the critical execution path.
* SERVER-45058 Report currentOp.active as false when internal services block ↵Amirsaman Memaripour2020-01-231-0/+32
| | | | on condvars
* SERVER-43987 Require predicates with ↵Ben Caimano2019-10-171-27/+30
| | | | OperationContext::waitForConditionOrInterrupt()
* SERVER-42165 Replace uses of stdx::mutex with mongo::MutexBen Caimano2019-09-171-27/+27
|
* SERVER-39339 Remove `stdx/memory.h`ADAM David Alan Martin2019-06-101-4/+4
|
* SERVER-39338 Remove `stdx/functional.h`ADAM David Alan Martin2019-06-101-2/+2
|
* SERVER-39794 Abort in-progress transactions on stepupSiyuan Zhou2019-05-141-20/+0
|
* SERVER-39848: Add flow control diagnostics.Daniel Gottlieb2019-04-091-0/+38
|
* SERVER-38175 invariant on markKill w extra infoJason Carey2019-03-061-0/+16
| | | | | | | | | | | | | | The OperationContext class accepts an ErrorCodes::Error for markKilled() and deadline-setting methods. This error code may be converted to a Status object on checkForInterruptNoAssert() or waitForConditionOrInterruptNoAssertUntil() call. When the error code is one that is associated with an ErrorExtraInfo object, Status construction will fail as we expect Status construction to either include a subclass of ErrorExtraInfo or a BSONObj from which it can be serialized. Until a use case comes up, add an invariant to prevent passing an error code with extra info
* SERVER-39427 Modify interrupt semantics for opCtxJason Carey2019-03-051-4/+71
| | | | | | | | | | | | * rename opCtx->runWithoutInterruption to runWithoutInterruptionExceptAtGlobalShutdown * add a opCtx->setIsExecutingShutdown method which makes the op immune to all forms of interruption, including global shutdown This clarifies what opCtx->runWithoutInterruption actually did and offers an escape hatch that turns off interruption at process exit for the thread doing cleanup.
* SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue2019-02-131-1/+0
| | | | | | Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-8/+10
|
* SERVER-36697 Utilize TickSource for transactions timing metricsWilliam Schultz2018-10-021-1/+1
| | | | | | | | | This patch converts the existing transactions diagnostics timing related metrics to use a TickSource to record transaction durations. The TickSource is a high precision, mock-able time source for measuring the passage of time. This patch also converts the existing unit tests to use a mock TickSource, which allows the tests to fully virtualize time, making them much faster and less flaky.
* SERVER-35679 Fix unused named exceptionJason Carey2018-09-181-1/+1
| | | | in operation_context_test
* SERVER-35679 General Interruption FacilityJason Carey2018-09-171-0/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for a generalized interruptibility facility in the server. This offers a generalized interruptibility facility, trialed in Future<T> and ProducerConsumerQueue<T>. It offers 3 major concepts: Notifyable: A type which can notified off-thread, causing a wake up from some kind of blocking wait Waitable: A type which is Notifyable, and also can perform work while in a ready-to-receive notification state. static methods offer support for running underneath condition_variable::wait's. The chief implementer is the transport layer baton type Interruptible: A type which can wait on condition variables, and offers: - deadlines. This means the type integrates some sort of clock source - interruptibility. This means the type offers a way of noticing that it should no longer run via status or exception Additionally, Interruptible's offer special scoped guards which offer - Exemption from interruption in a region defined by the lifetime of a guard object - Subsidiary deadlines which can trigger recursively, offering specialized timeout and status return support. The series of virtual types allows us to slice the interface between opCtx and future such that opctx can use future and future can use opctx. Additionally, cutting out more functionality allows us to flow a noop interruptibility type which unifies our waiting behind a common api.
* SERVER-35031 Return MaxTimeMSExpired for maxTimeMS timeoutJames Wahlin2018-07-241-8/+8
| | | | | | Adds a new 'MaxTimeMSExpired' error code, returned when a timeout occurs due to exceeding of maxTimeMS. Timeouts unrelated to maxTimeMS will continue to return 'ExceededTimeLimit'.
* SERVER-34798 Remove ServiceContext subclasses and use new ServiceContext in ↵Andy Schwerin2018-06-221-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | every unit test. This patch does several loosely related and surprisingly hard to separate things. 1.) Make the ServiceContext class final 2.) Create a mechanism, called ConstructorActions, for running methods on ServiceContexts immediately after they're built and immediately before they're destroyed. 3.) Introduce / improve test fixture base classes for tests, giving them fresh ServiceContext instances for each test case. There is one fixture for tests that need a storage engine and another for those that do not. 4.) Make several remaining global variables SC decorations in support of (3) 5.) Replace many MONGO_INITIALIZERS that access getGlobalServiceContext with the new constructor-actions system, which is needed for (3.) 6.) Fix up tests to use the fixtures from (3) and fix tests that silently used different service contexts in together in a technically illegal fashion that now breaks. 7.) Utilize (2) as necessary to simplify initialization of new ServiceContexts, simplifying the fixtures in (3).
* SERVER-33991 Pass txnNumber in getMore requests through mongosJack Mulrow2018-04-231-0/+29
|
* SERVER-31521 Make OperationContextGroup have a non-sticky interrupt and ↵Dianna Hohensee2017-10-191-13/+0
| | | | update ShardServerCatalogCacheLoader accordingly
* SERVER-30298 Add UserDigest LogicalSessionIDJason Carey2017-07-261-62/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inclusion of a sha256 digest of the full username to the logical session id (in addition to the current guid) is necessary to fully disambiguate logical sessions in degraded clusters (when the authoritative record for a session is unreachable). Semantics for the uid are as follows: session creation via startSession() * Sessions can only be created with one, and only one, user authenticated * The composite key is created from a guid created on the spot, as well as the digest of the currently auth'd username * Only the session guid is returned to the user * This prevents outside users from attempting to send back a value we'd have to check. It's preferable to decorate the guid with the user digest per command, rather than having to check a value the user might send. session use for a command * Sessions are passed via the lsid top level field in any command * Sessions are only meaningful for commands which requireAuth. For sessions which don't require auth, we strip session information from the command at parse time * Session ids are passed as an object, which can optionally include the username digest * It is illegal to pass the username digest unless the currently auth'd user has the impersonate privilege (the __system user does). This enables sessions on shard servers via mongos
* SERVER-30014 OperationContextGroup tracks, interrupts OperationContext objectsNathan Myers2017-07-131-0/+75
|
* SERVER-29852 Store session id and transaction number on all commands' ↵Kaloian Manassiev2017-06-271-26/+90
| | | | OperationContext
* SERVER-28298 Allow OperationContext objects to be created with an optional ↵samantharitter2017-04-121-0/+37
| | | | LogicalSessionId
* SERVER-25062 Remove racy, redundant SleepForExpires test from ↵Andy Schwerin2017-03-151-15/+0
| | | | | | | | | | operation_context_test. Since OperationContext::sleepFor is a thin wrapper around the predicate form of OperationContext::waitForConditionOrInterrupt, the SleepForExpires test duplicates coverage from the SleepUntilExpires and ForExpiresWhileWaiting tests. It is also racy, because it must sleep on a different condition variable from the one supplied in the WaitTestState.
* SERVER-25062 Fix return types of predicated waits and notification waitFor.Andy Schwerin2017-03-151-39/+38
| | | | | | This patch makes the return types of predicated waits on condition variables and Notification::waitFor look more like the corresponding functions in C++ standard types.
* SERVER-25062 Implement interruptible sleep and waitFor methods on ↵Andy Schwerin2017-03-091-10/+152
| | | | OperationContext.
* SERVER-27938 Rename all OperationContext variables to opCtxMaria van Keulen2017-03-071-54/+55
| | | | | | This commit is an automated rename of all whole word instances of txn, _txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all .cpp and .h files in src/mongo.
* SERVER-21004 Fix argument lookup compile error exposed by clang.Andy Schwerin2016-07-141-42/+42
|
* SERVER-21004 Interruptible wait on condition variables with OperationContexts.Andy Schwerin2016-07-131-4/+266
|
* SERVER-18277 Track elapsed time on cursors using microsecond resolution on ↵Andy Schwerin2016-05-231-2/+59
| | | | | | | | | | | | | OperationContext. This completes the mechanics of moving max-time tracking to OperationContext and switching the checkForInterrupt checks to use the service context's fast clock source, while tracking the amount of execution time remaining on a cursor with microsecond granularity to ensure that remaining execution time always declines, even for very brief operations on cursors. This patch does not complete the transition from wait_for waiting to wait_until waiting in all places that do waiting based on operation deadlines.
* SERVER-18277 Track operation deadlines in OperationContext, not CurOp.Andy Schwerin2016-05-231-0/+72
This also unifies the implementations of checkForInterrupt and checkForInterruptNoAssert.