| Age | Commit message (Collapse) | Author |
|
Co-authored-by: Benety Goh <benety@mongodb.com>
GitOrigin-RevId: e97b100882e14cca504952d321cedfb135321240
|
|
|
|
|
|
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.
|
|
catalog that returns collection as shared_ptr<const Collection>
AutoGetCollectionForRead and AutoGetCollectionForReadCommand now uses this and holds the shared_ptr. They return the collection as const.
Const correct various places to make this possible.
Moved some logic from Collection destructors to deregister from the catalog as they may now be destroyed at a later point.
|
|
This eliminates the need for the FAILURE status codes in
PlanStage and PlanExecutor, and brings query execution's
error reporting more in line with that of the rest of the
server. It also makes it easier for future implementations
of PlanExecutor to comply with the interface.
|
|
This patch includes also moves ownership of the collator to the ExpressionContext.
|
|
|
|
|
|
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
Replaced PlanStage::DEAD with PlanStage::FAILURE. In the subsequent
commit, PlanExecutor::DEAD will be taken care of in the next commit
|
|
keeping a Collection*.
In order to prevent COUNT stage from requiring a Collection*, splits
fast count into a new RECORD_STORE_FAST_COUNT stage.
|
|
|
|
on PlanStage::DEAD state
|
|
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.
|
|
|
|
Changes PlanStage::work() to be non-virtual. PlanStage::work() now
updates _commonStats and calls new pure virtual method doWork().
|
|
|
|
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.
|
|
unique_ptr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
|
|
and restoreState()
Also renames PlanExecutor::getStages() to PlanExecutor::getRootStage()
|
|
|
|
|
|
read locks, without doing the locking.
|
|
The explain implementation for .find() and .count() is feature complete. To use
the .find() implementation, set the enableNewExplain setParameter to true.
Count operations are explained through the new explain command, e.g.
db.runCommand({explain: {count: "coll", query: {foo: "bar"}}}).
|
|
It is now up to the BtreeInterface impl to decide what data it needs to save.
Save and restore must *always* be called before/after a yield if you intend
to use the cursor again, even if it is at EOF.
|
|
A more complete patch is coming soon
|
|
HeapRecordStore
|
|
Implementations should be able to use any data structure that maintains
sorted order.
|
|
Enable by the setParameter 'enableNewExplain'
|
|
|
|
|