summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_catalog.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-42165 Replace uses of stdx::mutex with mongo::MutexBen Caimano2019-09-171-9/+9
|
* SERVER-40983 Track and log relevant single transaction metrics on mongos for ↵Blake Oler2019-08-141-0/+1
| | | | currentOp
* SERVER-39692 Make mongos shutdown drain all in-progress transactionsRandolph Tan2019-07-181-0/+17
|
* SERVER-39339 Remove `stdx/memory.h`ADAM David Alan Martin2019-06-101-1/+2
|
* SERVER-37837 Examine and reap sessions from the SessionsCatalogKaloian Manassiev2019-05-171-10/+55
| | | | | This change makes the logical sessions cache query and reap sessions, which are possibly only in-memory on the SessionsCatalog.
* SERVER-37837 Use unique_ptr instead of shared_ptr for the SessionCatalog mapKaloian Manassiev2019-05-071-12/+9
|
* SERVER-36483 Do not reap transaction entries for prepared transactionsKaloian Manassiev2019-05-021-0/+8
|
* SERVER-38810 Use Session's concurrency control rules instead of internal ↵Andy Schwerin2019-02-151-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mutexes in TransactionParticipant This type simplifies and clarifies concurrency control in TransactionParticipant by: (1) Removing TP's own mutexes and using the Session concurrency control rules, instead. That is, certain state is only accessible when the Session is checked out, and requires no further locking. Other state is observable either while holding the client lock or while having checked out the Session. The latter type of state is modifiable only when having checked out the session and locked the client. (2) Separating the two types of state in (1) into separate sub-structures in TransactionParticipant, to make it clear who can access what state, (3) Putting all methods formerly on TransactionParticipant onto new member classes, TransactionParticipant::Participant and TransactionParticipant::Observer. The latter can only read the observable state from (1) above, and the participant may read or modify all of the state. The two types introduced by (3) are designed to enforce proper concurrency control by limiting access of their methods to the underlying TransactionParticipant member variables. The observer type has a private o() method which its other methods are required by convention to use in order to obtain read-only access to the Observable state of the TransactionParticipant. The participant type has the o() method plus an o(WithLock) method that allows mutation of the state while holding the client lock, and a p() method which allows reading and writing of the private state with no other locks. Please see the implementation in transaction_participant.cpp for examples. It is worth noting that with this change, locking the Client is not needed often and never for long, and there is no need for separate mutexes for participant state and monitoring state.
* 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-36663 Prevent killOperation from running without lockJonathan Ma2019-01-241-1/+1
|
* SERVER-38810 Temporarily do not hold the client lock in ObservableSession in ↵Kaloian Manassiev2019-01-111-1/+2
| | | | order to avoid deadlock
* SERVER-38810 Simplify correct usage of locking in Session/SessionCatalog.Andy Schwerin2019-01-101-38/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces two new types for gaining access to sessions in the session catalog, based on the context of the access. It leaves a third way to access sessions, which is via OperationContextSession::get(). The new types are ObservableSession and SessionToKill. With this change, a thread may access a session in one of three ways: (1) by binding the session to an OperationContext for regular use, by instantiation of OperationContextSession or MongoDOperationContextSession, as before. (2) In the callback passed to SessionCatalog::scanSessions, in which case the callback is passed an ObservableSession that represents looking at a Session while the SessionCatalog mutex is locked and while the bound OperationContext's client mutex is held, if the session is currently checked out via methods (1) or (3). (3) By calling SessionCatalog::checkOutSessionForKill, which returns a KillableSession. This is used for cleaning a session up after it is marked for kill. This patch eliminates Session::_mutex, which is no longer required, as the SessionCatalog::_mutex and the Client provide all necessary mutual exclusion for the Session type itself.
* SERVER-38429 Signal all threads waiting for checking out session on session ↵Siyuan Zhou2018-12-191-1/+1
| | | | checkin
* SERVER-37923 Make chunk migration check-out the sessionKaloian Manassiev2018-12-061-24/+12
| | | | | With this change there are no callers which modify the session state without having checked it out first.
* SERVER-37665 Add interface to explicitly checkin/checkout the OpContext sessionKaloian Manassiev2018-11-161-14/+28
|
* SERVER-37665 Get rid of the 'checkOutSession' parameter of ↵Kaloian Manassiev2018-11-161-36/+25
| | | | | | | | | | | OperationContextSession This simplifies the behaviour of the class and moves all the check-out decision taking to happen in the only consumer - the endpoint. Also renames OperationContextSessionMongoD to MongoDOperationContextSession in order to be in sync with the naming nomenclature of SessionCatalog and MongoDSessionCatalog.
* SERVER-37244 Make sessions killable outside of the ↵Kaloian Manassiev2018-10-311-52/+46
| | | | Session/TransactionParticipant object
* SERVER-37244 Pull the Session state management from SessionRuntimeInfo into ↵Kaloian Manassiev2018-10-301-16/+15
| | | | | | | | Session The session's check-out state is currently duplicated between SessionCatalog's internal container structure and the Session class. This change moves it all to be under Session.
* SERVER-37711 Revert commits related to lock yielding for prepared ↵Kaloian Manassiev2018-10-251-39/+0
| | | | | | | | | | | transactions on step down This change reverts the following commits: * SERVER-35870 Allow stepdown to work with prepared transactions (f96903979ac329a760e7b6f1bb5d8695d3daf2a7) * SERVER-36913 Add functionality to LockManager for repl state transitions with prepared transactions (e65ff57e108ed69c46cc0b0ccbdd675663de2469) * SERVER-35870 Allow more than one thread to block Session checkout at a time (9406af079a894bae80fbbec4703b04974bf84476) * SERVER-35870 Add functionality to prevent Session checkouts & wait for all Sessions to be checked in (c6d90316d6b694e12426274c713a4a078e004fc5)
* SERVER-37701 Make SessionUpdateTracker include the uid portion of ↵Randolph Tan2018-10-231-1/+1
| | | | LogicalSessionId when tracking
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-8/+10
|
* SERVER-37244 Move MongoD-specific code out of SessionCatalogKaloian Manassiev2018-10-121-54/+4
|
* SERVER-36799 Move all transactions and retryable writes functionality from ↵Kaloian Manassiev2018-10-081-1/+3
| | | | | | | Session into TransactionParticipant This change leaves the Session class to be a plain decorable structure only used for serialization of operations on the same logical session.
* SERVER-35870 Allow more than one thread to block Session checkout at a timeSpencer T Brody2018-09-281-8/+9
|
* SERVER-35870 Add functionality to prevent Session checkouts & wait for all ↵Spencer T Brody2018-09-171-0/+38
| | | | Sessions to be checked in
* SERVER-35870 Rename SessionCatalog::_txnTable to _sessionsSpencer T Brody2018-09-171-14/+14
|
* SERVER-36736 Avoid doing work in Client lock when destroying ↵Matthew Russotto2018-08-281-5/+10
| | | | OperationContextSession.
* SERVER-36331 Kill running op when a transaction expiresSpencer T Brody2018-08-151-0/+5
|
* SERVER-35900 Refactor transaction machinery out from Session classRandolph Tan2018-08-081-17/+2
|
* SERVER-36007 Fixed self-deadlock caused by checking out an already checked ↵jinichu2018-08-081-1/+2
| | | | out session in SessionCatalog
* SERVER-35244 Dropping config db in 4.0.0-rc0 fails while it passes in 3.7.9 ↵Sarah Zhou2018-08-071-5/+9
| | | | and earlier
* SERVER-35173 Added autocommit value to currentOp's transaction sub-documentjinichu2018-07-051-0/+6
|
* SERVER-34811 Forbid reads and writes to the config, admin, and local ↵Tess Avitabile2018-05-081-2/+4
| | | | databases within transactions
* SERVER-34051 Require autocommit=false on all transaction operations and add ↵William Schultz2018-04-041-2/+4
| | | | | | | | | | | support for 'startTransaction' argument This patch requires all operations that are part of a multi-statement transaction to specify an autocommit=false command argument. It also adds the 'startTransaction' command argument, which when specified as 'true' indicates that a command is the beginning of a multi-statement transaction.
* SERVER-34101 Revert change to free transaction resources on snapshot read ↵James Wahlin2018-03-281-34/+0
| | | | killCursors
* SERVER-33922 Remove nestingLevel from SessionCatalog, check for ↵Spencer T Brody2018-03-201-38/+18
| | | | DBDirectClient explicitly instead
* SERVER-33669 Stepdown and shutdown should abort all uncommitted transactionsTess Avitabile2018-03-201-17/+5
|
* SERVER-33591 Cleanup interaction of write concerns and transactionsSiyuan Zhou2018-03-151-29/+4
|
* SERVER-33551 Track snapshot read transactions with ↵Matthew Russotto2018-03-141-0/+4
| | | | MultiDocumentTransactionState in Session
* SERVER-33672 Make killSessionsLocal() kill any matching SessionsTess Avitabile2018-03-141-0/+18
|
* SERVER-33689 killCursors on snapshot read cursor should free stashed ↵Tess Avitabile2018-03-131-3/+37
| | | | transaction resources
* SERVER-33440 DBDirectClient operations should be able to perform session ↵Tess Avitabile2018-02-231-14/+8
| | | | checkout
* Fix lintWilliam Schultz2018-02-211-1/+1
|
* SERVER-32880 Parse and add autocommit parameter to SessionPavithra Vetriselvan2018-02-211-2/+6
|
* SERVER-33223 Add transaction resource stashJames Wahlin2018-02-161-0/+30
|
* SERVER-32617 Fix code that reconstructs status with just code and stringMathias Stearn2018-01-171-5/+5
|
* SERVER-31342 Do not remove checked-out sessions from the cache on invalidationKaloian Manassiev2017-10-181-8/+19
|
* SERVER-31114 Perform targeted session invalidation on direct writes to ↵Kaloian Manassiev2017-09-201-4/+29
| | | | `config.transactions`
* Revert "SERVER-31114 Perform targeted session invalidation on direct writes ↵Kaloian Manassiev2017-09-201-29/+4
| | | | | | to `config.transactions`" This reverts commit c8cb9cc374af47f862d81e52ad4bc33d96239ef0.
* SERVER-31114 Perform targeted session invalidation on direct writes to ↵Kaloian Manassiev2017-09-201-4/+29
| | | | `config.transactions`