summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_catalog_mongod.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-41469 Enforce w:1 for creation of transactions table on step-upJason Chan2019-07-011-17/+6
|
* SERVER-41269 Set txn state to in-progress when fetching active transaction stateSiyuan Zhou2019-05-301-2/+1
|
* SERVER-37837 Examine and reap sessions from the SessionsCatalogKaloian Manassiev2019-05-171-0/+37
| | | | | This change makes the logical sessions cache query and reap sessions, which are possibly only in-memory on the SessionsCatalog.
* SERVER-39794 Abort in-progress transactions on stepupSiyuan Zhou2019-05-141-26/+52
|
* SERVER-37235 Use an onCommit/Abort handler to complete session kill on ↵Kaloian Manassiev2019-05-141-33/+68
| | | | direct writes to `config.transactions`
* SERVER-37837 Get rid of TransactionReaper (Part 2)Kaloian Manassiev2019-05-091-20/+109
| | | | | | This change folds the TransactionReaper's single function to be part of the SessionCatalogs on MongoD and MongoS, which are the subsystems responsible for managing transactions.
* SERVER-36483 Do not reap transaction entries for prepared transactionsKaloian Manassiev2019-05-021-2/+11
|
* SERVER-39965 OutOfLineExecutor Tasks are now unique_function(Status)Ben Caimano2019-04-051-15/+16
|
* Revert "SERVER-39965 OutOfLineExecutor Tasks are now unique_function(Status)"Benety Goh2019-04-031-16/+15
| | | | This reverts commit 04ea1d46eb6c4c78e19409f120ae2e61f2a35204.
* SERVER-39965 OutOfLineExecutor Tasks are now unique_function(Status)Ben Caimano2019-04-021-15/+16
|
* SERVER-37348 Make replication applier batches uninterruptibleMatthew Saltz2019-02-251-3/+8
|
* SERVER-38810 Use Session's concurrency control rules instead of internal ↵Andy Schwerin2019-02-151-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-38282 Yield locks for prepared transactions on stepdown.Siyuan Zhou2019-01-241-1/+4
|
* SERVER-38810 Simplify correct usage of locking in Session/SessionCatalog.Andy Schwerin2019-01-101-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-38282 Step-up reacquires locks for prepared transactionsSiyuan Zhou2019-01-071-7/+29
|
* SERVER-38713 Get rid of transaction number equality checking from ↵Kaloian Manassiev2018-12-221-5/+4
| | | | checkStatementExecuted
* SERVER-38677 Remove the invalidations counter from TransactionParticipantKaloian Manassiev2018-12-181-1/+1
|
* SERVER-33683 Prevent deadlock in aggregate with transactionsIan Boros2018-12-171-0/+16
|
* SERVER-35879 Skip invalidating sessions that have a transaction when a node ↵Samy Lanka2018-12-131-23/+42
| | | | becomes primary
* SERVER-37923 Rename TransactionParticipant::getFromNonCheckedOutSession to ↵Kaloian Manassiev2018-12-061-2/+1
| | | | be just get(Session*)
* SERVER-37245 Do not access the SessionCatalog directly if not necessaryKaloian Manassiev2018-11-191-0/+6
| | | | | | | The session catalog should not be accessed directly by majority of the consumers on mongod or mongos, instead they should interact with it through the decorations, which properly validate that the session has been assigned to the OperationContext.
* SERVER-37665 Get rid of the 'checkOutSession' parameter of ↵Kaloian Manassiev2018-11-161-0/+19
| | | | | | | | | | | 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 Use thread-pool instead of detached std::thread in ↵Kaloian Manassiev2018-11-051-11/+44
| | | | MongoDSessionCatalog
* SERVER-37244 Make sessions killable outside of the ↵Kaloian Manassiev2018-10-311-1/+54
| | | | Session/TransactionParticipant object
* 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-0/+86