summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/count.cpp
AgeCommit message (Collapse)Author
2024-05-23SERVER-90645 Enable tidy check misc-unused-using-decls (#22430)Matt Kneiser
Co-authored-by: Benety Goh <benety@mongodb.com> GitOrigin-RevId: e97b100882e14cca504952d321cedfb135321240
2023-09-23SERVER-81059 bulk-revert of include of boost iif.hppBilly Donahue
2023-06-27SERVER-77047 SERVER-77048 IWYU automated changes up to end ratio 0.8Daniel Moody
2020-09-26SERVER-50984 Add CollectionPtr to replace usage of const Collection*Henrik Edin
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.
2020-08-07SERVER-47885 Added lookupCollectionByXXXForRead interface to the Collection ↵Henrik Edin
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.
2020-05-29SERVER-43821 Make PlanStage and PlanExecutor return errors by throwingDavid Storch
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.
2020-02-28SERVER-45406 Plumb ExpressionContext through PlanStageIan Boros
This patch includes also moves ownership of the collator to the ExpressionContext.
2019-06-10SERVER-39339 Remove `stdx/memory.h`ADAM David Alan Martin
2019-04-25SERVER-40253 Implement count command in IDLTed Tuckman
2019-02-13SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue
Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
2019-01-30SERVER-38316 Consolidate PlanExecutor::DEAD and PlanExecutor::FAILUREPawel Terlecki
Replaced PlanStage::DEAD with PlanStage::FAILURE. In the subsequent commit, PlanExecutor::DEAD will be taken care of in the next commit
2018-11-07SERVER-37446 Change PlanStages which don't require a collection to avoid ↵David Storch
keeping a Collection*. In order to prevent COUNT stage from requiring a Collection*, splits fast count into a new RECORD_STORE_FAST_COUNT stage.
2018-10-22SERVER-37651 Update header files with new licenseRamon Fernandez
2018-05-01SERVER-34725: Group and count plan stages do not set the WorkingSetID output ↵Nick Zolnierz
on PlanStage::DEAD state
2017-03-07SERVER-27938 Rename all OperationContext variables to opCtxMaria van Keulen
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.
2016-02-04SERVER-20536 Ignore comment field when planning counts.Charlie Swanson
2016-01-14SERVER-19377 PlanStage: make work() non-virt, add virt method doWork()Jason Rassi
Changes PlanStage::work() to be non-virtual. PlanStage::work() now updates _commonStats and calls new pure virtual method doWork().
2015-10-08SERVER-20111 Plan summary should only include the winning planCharlie Swanson
2015-08-04SERVER-19364 move query stage OperationContext pointer management into the ↵Qingyang Chen
base class
2015-07-23SERVER-18913 Remove redundant test in CountStage::work()Qingyang Chen
2015-07-16SERVER-17364 Don't stash RecoveryUnits across getMoresMathias Stearn
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.
2015-07-16SERVER-17364 Unify handling of child stages into PlanStage base classMathias Stearn
This is prep for adding more methods that need to propagate to children.
2015-06-29SERVER-16889.5 PlanExecutor::getStats() and PlanStage::getStats() return ↵Qingyang Chen
unique_ptr
2015-06-20SERVER-18579: Clang-Format - reformat code, no comment reflowMark Benvenuto
2015-06-11SERVER-18791 Pull count command parsing into a separate libraryKaloian Manassiev
2015-06-10SERVER-17309 Replace std::auto_ptr<T> with std::unique_ptr<T>Andrew Morrow
2015-06-09SERVER-2454 Improve PlanExecutor::DEAD handlingJames Wahlin
2015-04-17SERVER-17633 add const qualifiers to PlanStage and Explain interfacesDavid Storch
2015-02-16SERVER-17062 rename NEED_FETCH to NEED_YIELDDavid Storch
2015-01-15SERVER-13256 Add usings and qualifications for names from namespace stdAndrew Morrow
2014-11-26SERVER-13679 Replace DiskLoc with RecordId outside of MMAPv1Mathias Stearn
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.
2014-11-20SERVER-15675 Stages should clear their OperationContext in saveState()Jason Rassi
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().
2014-11-20SERVER-15675 PlanStage::invalidate() needs OperationContextJason Rassi
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.
2014-11-04SERVER-15665 MMAP v1 requests yields during page faults via NEED_FETCHDavid Storch
2014-10-02SERVER-15363 fix solaris compileDavid Storch
2014-09-18SERVER-15187 Update saved OperationContext in all PlanStagesDavid Percy
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>
2014-09-10SERVER-14098 add CountStageDavid Storch
2014-08-25SERVER-13635: OperationContext on read pathsEliot Horowitz
2014-07-29SERVER-14633 rename prepareToYield() and recoverFromYield() to saveState() ↵David Storch
and restoreState() Also renames PlanExecutor::getStages() to PlanExecutor::getRootStage()
2014-07-22SERVER-14407 replace Runner with PlanExecutorDavid Storch
2014-07-08SERVER-14408 access stats directly from execution stagesDavid Storch
2014-07-08SERVER-14387 Propogate OperationContext through calls requiring document ↵Craig Harris
read locks, without doing the locking.
2014-06-27SERVER-14097 SERVER-14098 execution-level explain for .find() and .count()David Storch
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"}}}).
2014-06-20SERVER-13635 Clean up BtreeCursor save/restore.Mathias Stearn
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.
2014-06-20SERVER-13635 Undo change to BtreeCursor save/restoreMathias Stearn
A more complete patch is coming soon
2014-06-20SERVER-13635 Implement Heap1BtreeImpl as an alternative to Btree in ↵Mathias Stearn
HeapRecordStore
2014-06-19SERVER-13635 Make BtreeInterface not Btree-specificMathias Stearn
Implementations should be able to use any data structure that maintains sorted order.
2014-06-11SERVER-14096 explain find() at queryPlanner verbosityDavid Storch
Enable by the setParameter 'enableNewExplain'
2014-03-06SERVER-13041 remove some slow leftover ixscan junk from fast count stageHari Khalsa
2014-01-29SERVER-12460 faster count for simple queriesHari Khalsa