| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This change attaches context to the plan executor in order to distinguish
a yield request due to a write conflict from one due to a TemporarilyUnavailable
error, and to handle the two cases accordingly in the query execution code.
|
|
|
|
| |
`TemporarilyUnavailableException` into `assert_util.h`
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It implements a yieldable interface that is used to re-load the
Collection pointer from the catalog after a yield that released locks.
With lock-free reads and copy-on-write on Collection instances releasing
locks without notifying an AutoGetCollection at a higher level may cause
its pointers to dangle if a MODE_X writer installs a new Collection
instance in the catalog.
CollectionPtr should be passed by const reference so a yield can notify
all the way up.
|
| |
|
|
|
|
| |
This patch includes also moves ownership of the collator to the ExpressionContext.
|
|
|
|
|
|
|
|
| |
Also replaces WorkingSetMember::isSuspicious with a scheme
that associates a snapshot id with every index key. This is
needed because extracted WorkingSetMembers are not
discoverable from the WorkingSet, and thus cannot be marked
as suspicious in preparation for yield.
|
|
|
|
|
|
|
|
| |
The bulk of this change is to implement serialization and
deserialization routines for WorkingSetMember, so that the
Sorter can spill WorkingSetMembers to disk. In addition,
this changes the SortExecutor to sort WorkingSetMembers
internally as opposed to sorting Documents.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
|
|
| |
Handles COUNT_SCAN, DISTINCT_SCAN, IDHACK, and TEXT_OR.
|
| |
|
| |
|
| |
|
|
|
|
| |
and document keys
|
|
|
|
| |
In preparation for removing the Batched Insert/Update/Delete Request parser classes.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
We use index version v=2 as the default index version when the
featureCompatibilityVersion is 3.4, and we use index version v=1 as the
default index version when the featureCompatibilityVersion is 3.2.
The "collation" index option can only be used with v=2 indexes.
|
| |
|
|
|
|
|
|
|
| |
Applies to plan stages that use an index:
- COUNT_SCAN
- DISTINCT_SCAN
- IXSCAN
|
|
|
|
|
|
| |
Also renamed:
* WorkingSetMember::hasLoc() -> WorkingSetMember::hasRecordId
* WorkingSetMember::loc -> WorkingSetMember::recordId
|
|
|
|
|
| |
Changes PlanStage::work() to be non-virtual. PlanStage::work() now
updates _commonStats and calls new pure virtual method doWork().
|
|
|
|
| |
query execution
|
| |
|
|
|
|
| |
base class
|
|
|
|
|
|
|
| |
We now tell PlanExecutors to detach from their OperationContexts and to shed
all storage engine resources before stashing the ClientCursor. This is a
heavier weight operation than a normal save/restoreState which is no longer
allowed to change the OperationContext.
|
|
|
|
| |
This is prep for adding more methods that need to propagate to children.
|
|
|
|
|
|
|
| |
WiredTiger snapshot change
Improves performance for query plans with a blocking stage when using the WiredTiger storage engine.
In particular, full text search and geoNear queries should benefit.
|
|
|
|
| |
unique_ptr
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Major changes:
* Implementation now responsible for simple end point checking.
* No way to ask for current position. Relocating methods now return position.
* Simplified seeking methods so they have clear uses.
* Callers can use saveUnpositioned to indicate they don't care about position.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Operations:
sed -i -e 's/\<DiskLoc\>/RecordId/g'
sed -i -e 's/\<DiskLocs\>/RecordIds/g'
sed -i -e 's/\<minDiskLoc\>/RecordId::min()/g'
sed -i -e 's/\<maxDiskLoc\>/RecordId::max()/g'
sed -i -e 's/\<getDiskLoc\>/getRecordId/g''
Changes under mmap_v1 were reverted and redone by hand as needed.
|
|
|
|
|
|
| |
While state is saved, threads pass in their own OperationContext to
invalidate(). When state is restored, the stage will resume with the
OperationContext passed in to restoreState().
|
|
|
|
|
|
|
| |
PlanStage::invalidate() is always called by a different thread than
the stage's owning thread. The method should use the active
OperationContext (the caller's) rather than the stage's
OperationContext.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every stage that has a field of type OperationContext*
should be updating it when ::restoreState(OperationContext*) is called.
Otherwise it is retaining a reference to deleted memory.
This bug hasn't surfaced before because:
1. the OperationContext used to be stack allocated, so it would have the
same address every time
2. mmapv1 doesn't always need to dereference the OperationContext
Closes #781
Signed-off-by: Benety Goh <benety@mongodb.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Storage engines might need the current OperationContext to restore their
state.
For example, BDBRecordIterator needs access to the current underlying
transaction to recreate an underlying cursor. Having the BDBRecordIterator
save a pointer to the OperationContext it was created with won't work,
because the OperationContext is destroyed and a new one created between
saveState and restoreState.
|