| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
CollectionShardingRuntime methods
|
|
|
|
|
|
|
| |
o converting some log lines that were missed
o fixing some missing includes
create mode 100644 src/mongo/transport/ismaster_metrics.cpp
|
| |
|
|
|
|
| |
create mode 100644 jstests/noPassthroughWithMongod/top_rename.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two concurrent storage transactions can now create collections with the same
collection name. These transactions will conflict at commit time; the first
committer will win and register their collection into the global catalog. The
losing transactions will bubble a WriteConflictException.
Top-level callers that should fail if the collection already existed must now
check and fail with a NamespaceExists error code. Previously, those callers
could rely on lower level code returning the NamespaceExists error.
Callers that were implicitly creating a collection may retry the operation,
using the now-registered collection.
These transaction-local collections (UncommittedCollections) are returned when
doing any CollectionCatalog::lookup* call.
|
|
|
|
| |
locking in a read snapshot
|
|
|
|
| |
behind the PBW lock
|
| |
|
|
|
|
| |
CollectionCatalog::get().lookupCollectionByNamespace()
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
AutoGetCollectionForRead
|
|
|
|
| |
on secondaries
|
|
|
|
|
|
| |
PBWM lock on secondaries"
This reverts commit b6ad5c431b8a1272617a3eff58872808afa53e31.
|
|
|
|
| |
on secondaries
|
|
|
|
| |
read source when there are conflicting catalog changes
|
|
|
|
| |
AutoGetCollectionForRead
|
|
|
|
| |
pending catalog changes in AutoGetCollectionForRead using a provided timestamp read source
|
| |
|
|
|
|
| |
secondary batch application.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
|
|
|
|
|
|
|
|
| |
Readers of the view catalog depend on a MODE_IS DB lock preventing
concurrent writes to the view catalog. This is true for regular view
maintenance commands like collMod, create, and drop. However, on
secondaries these commands are replicated as direct writes to
system.views and do not hold as strong of a lock. Further, a user is
permitted to write directly to system.views and so could hit a similar
issue on the primary.
|
| |
|
|
|
|
|
| |
Repurpose DatabaseHolder::get() for accessing singleton.
Deprecate DatabaseHolder::getDatabaseHolder().
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
An enum is now used to indicate at which time to read on a RecoveryUnit.
|
|
|
|
| |
AutoGetCollectionForRead should not read at the last-applied timestamp.
|
| |
|
|
|
|
|
|
|
|
| |
The `MONGO_DECLARE_SHIM`, `MONGO_DEFINE_SHIM`, and `MONGO_REGISTER_SHIM`
macros can be used to create specialized types which are customization
and auto-registration points for late-binding functions. In some
sense they work like weak-symbols; however, they also are useful for
tracking dependencies upon shimmed-out implementations.
|
|
|
|
| |
This reverts commit 2227f272a7a0a3e43625cb2d4a2704e1ccb6f893.
|
|
|
|
| |
changes
|
|
|
|
|
|
|
|
| |
The `MONGO_DECLARE_SHIM`, `MONGO_DEFINE_SHIM`, and `MONGO_REGISTER_SHIM`
macros can be used to create specialized types which are customization
and auto-registration points for late-binding functions. In some
sense they work like weak-symbols; however, they also are useful for
tracking dependencies upon shimmed-out implementations.
|
| |
|
|
|
|
| |
before accessing the value
|
|
|
|
| |
cursors
|
| |
|
|
|
|
| |
MultiDocumentTransactionState in Session
|