diff options
author | Mathias Stearn <mathias@10gen.com> | 2012-07-17 17:18:49 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2012-07-20 18:16:38 -0400 |
commit | 94a0643a83b063678907c767a62066679f618981 (patch) | |
tree | f5669a35675337923ffcf1207ebdc5322e8b8d8b /src | |
parent | 3e81903a1c824560c3cb77f7b6d6d6cd24860d74 (diff) | |
download | mongo-94a0643a83b063678907c767a62066679f618981.tar.gz |
Rip out manageDependecies and DependencyTracker stuff SERVER-4644
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/SConscript | 1 | ||||
-rwxr-xr-x | src/mongo/db/commands/document_source_cursor.cpp | 15 | ||||
-rw-r--r-- | src/mongo/db/commands/pipeline.cpp | 17 | ||||
-rwxr-xr-x | src/mongo/db/mongod.vcxproj | 4 | ||||
-rwxr-xr-x | src/mongo/db/mongod.vcxproj.filters | 8 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/dependency_tracker.cpp | 59 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/dependency_tracker.h | 71 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/document.cpp | 16 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/document.h | 10 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/document_source.cpp | 7 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/document_source.h | 105 | ||||
-rw-r--r-- | src/mongo/db/pipeline/document_source_match.cpp | 7 | ||||
-rw-r--r-- | src/mongo/db/pipeline/document_source_project.cpp | 66 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/document_source_sort.cpp | 11 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/document_source_unwind.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/pipeline/expression.cpp | 1 | ||||
-rwxr-xr-x | src/mongo/db/pipeline/expression.h | 1 | ||||
-rw-r--r-- | src/mongo/s/mongos.vcxproj | 4 | ||||
-rwxr-xr-x | src/mongo/s/mongos.vcxproj.filters | 8 |
19 files changed, 13 insertions, 404 deletions
diff --git a/src/mongo/SConscript b/src/mongo/SConscript index 2267b361437..b84986dc439 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -119,7 +119,6 @@ env.StaticLibrary("coredb", [ "db/pipeline/accumulator_single_value.cpp", "db/pipeline/accumulator_sum.cpp", "db/pipeline/builder.cpp", - "db/pipeline/dependency_tracker.cpp", "db/pipeline/doc_mem_monitor.cpp", "db/pipeline/document.cpp", "db/pipeline/document_source.cpp", diff --git a/src/mongo/db/commands/document_source_cursor.cpp b/src/mongo/db/commands/document_source_cursor.cpp index d12f7dfbb9f..c99504ad446 100755 --- a/src/mongo/db/commands/document_source_cursor.cpp +++ b/src/mongo/db/commands/document_source_cursor.cpp @@ -134,8 +134,7 @@ namespace mongo { } } - pCurrent = Document::createFromBsonObj( - &documentObj, NULL /* LATER pDependencies.get()*/); + pCurrent = Document::createFromBsonObj(&documentObj); cursor()->advance(); return; @@ -195,9 +194,8 @@ namespace mongo { const intrusive_ptr<ExpressionContext> &pCtx): DocumentSource(pCtx), pCurrent(), - _cursorWithContext( cursorWithContext ), - pDependencies() { - } + _cursorWithContext( cursorWithContext ) + {} intrusive_ptr<DocumentSourceCursor> DocumentSourceCursor::create( const shared_ptr<CursorWithContext>& cursorWithContext, @@ -227,11 +225,4 @@ namespace mongo { _projection->init(projection); cursor()->fields = _projection; } - - void DocumentSourceCursor::manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker) { - /* hang on to the tracker */ - pDependencies = pTracker; - } - } diff --git a/src/mongo/db/commands/pipeline.cpp b/src/mongo/db/commands/pipeline.cpp index 1853f45c019..b03624d2a08 100644 --- a/src/mongo/db/commands/pipeline.cpp +++ b/src/mongo/db/commands/pipeline.cpp @@ -20,7 +20,6 @@ #include "mongo/client/authentication_table.h" #include "db/jsobj.h" #include "db/pipeline/accumulator.h" -#include "db/pipeline/dependency_tracker.h" #include "db/pipeline/document.h" #include "db/pipeline/document_source.h" #include "db/pipeline/expression.h" @@ -372,22 +371,6 @@ namespace mongo { bool Pipeline::run(BSONObjBuilder &result, string &errmsg, const intrusive_ptr<DocumentSource> &pInputSource) { - /* - Analyze dependency information. - - This pushes dependencies from the end of the pipeline back to the - front of it, and finally passes that to the input source before we - execute the pipeline. - */ - intrusive_ptr<DependencyTracker> pTracker(new DependencyTracker()); - for(SourceVector::reverse_iterator iter(sourceVector.rbegin()), - listBeg(sourceVector.rend()); iter != listBeg; ++iter) { - intrusive_ptr<DocumentSource> pTemp(*iter); - pTemp->manageDependencies(pTracker); - } - - pInputSource->manageDependencies(pTracker); - /* chain together the sources we found */ DocumentSource *pSource = pInputSource.get(); for(SourceVector::iterator iter(sourceVector.begin()), diff --git a/src/mongo/db/mongod.vcxproj b/src/mongo/db/mongod.vcxproj index 1ab63067754..d2e0fa1d459 100755 --- a/src/mongo/db/mongod.vcxproj +++ b/src/mongo/db/mongod.vcxproj @@ -1156,7 +1156,6 @@ cscript //Nologo ..\shell\createCPPfromJavaScriptFiles.js "$(ProjectDir).." <ClCompile Include="pipeline\accumulator_single_value.cpp" />
<ClCompile Include="pipeline\accumulator_sum.cpp" />
<ClCompile Include="pipeline\builder.cpp" />
- <ClCompile Include="pipeline\dependency_tracker.cpp" />
<ClCompile Include="pipeline\document.cpp" />
<ClCompile Include="pipeline\document_source.cpp" />
<ClCompile Include="pipeline\document_source_bson_array.cpp" />
@@ -1440,7 +1439,6 @@ cscript //Nologo ..\shell\createCPPfromJavaScriptFiles.js "$(ProjectDir).." <ClInclude Include="pagefault.h" />
<ClInclude Include="pipeline\accumulator.h" />
<ClInclude Include="pipeline\builder.h" />
- <ClInclude Include="pipeline\dependency_tracker.h" />
<ClInclude Include="pipeline\document.h" />
<ClInclude Include="pipeline\document_source.h" />
<ClInclude Include="pipeline\doc_mem_monitor.h" />
@@ -1548,4 +1546,4 @@ cscript //Nologo ..\shell\createCPPfromJavaScriptFiles.js "$(ProjectDir).." <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file +</Project>
diff --git a/src/mongo/db/mongod.vcxproj.filters b/src/mongo/db/mongod.vcxproj.filters index 4fa57100c76..1473dd79202 100755 --- a/src/mongo/db/mongod.vcxproj.filters +++ b/src/mongo/db/mongod.vcxproj.filters @@ -304,9 +304,6 @@ <ClCompile Include="ops\delete.cpp">
<Filter>db\ops</Filter>
</ClCompile>
- <ClCompile Include="pipeline\dependency_tracker.cpp">
- <Filter>db\pipeline\Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\scripting\engine.cpp">
<Filter>scripting</Filter>
</ClCompile>
@@ -947,9 +944,6 @@ <ClInclude Include="pipeline\accumulator.h">
<Filter>db\pipeline\Header Files</Filter>
</ClInclude>
- <ClInclude Include="pipeline\dependency_tracker.h">
- <Filter>db\pipeline\Header Files</Filter>
- </ClInclude>
<ClInclude Include="pipeline\doc_mem_monitor.h">
<Filter>db\pipeline\Header Files</Filter>
</ClInclude>
@@ -1860,4 +1854,4 @@ <Filter>db\Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
-</Project>
\ No newline at end of file +</Project>
diff --git a/src/mongo/db/pipeline/dependency_tracker.cpp b/src/mongo/db/pipeline/dependency_tracker.cpp deleted file mode 100755 index c019ceb315a..00000000000 --- a/src/mongo/db/pipeline/dependency_tracker.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2012 10gen Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "pch.h" - -#include "db/pipeline/dependency_tracker.h" -#include "db/pipeline/document_source.h" - -namespace mongo { - - DependencyTracker::Tracker::Tracker( - const string &fp, const DocumentSource *pS): - fieldPath(fp), - pSource(pS) { - } - - void DependencyTracker::addDependency( - const string &fieldPath, const DocumentSource *pSource) { - Tracker tracker(fieldPath, pSource); - std::pair<MapType::iterator, bool> p( - map.insert(std::pair<string, Tracker>(fieldPath, tracker))); - - /* - If there was already an entry, update the dependency to be the more - recent source. - */ - if (!p.second) - (*p.first).second.pSource = pSource; - } - - void DependencyTracker::removeDependency(const string &fieldPath) { - map.erase(fieldPath); - } - - bool DependencyTracker::getDependency( - intrusive_ptr<const DocumentSource> *ppSource, - const string &fieldPath) const { - MapType::const_iterator i(map.find(fieldPath)); - if (i == map.end()) - return false; - - *ppSource = (*i).second.pSource; - return true; - } - -} diff --git a/src/mongo/db/pipeline/dependency_tracker.h b/src/mongo/db/pipeline/dependency_tracker.h deleted file mode 100755 index 7b44f03dec4..00000000000 --- a/src/mongo/db/pipeline/dependency_tracker.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2012 10gen Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "pch.h" - -#include <boost/unordered_map.hpp> -#include "util/intrusive_counter.h" - - -namespace mongo { - - class DocumentSource; - - class DependencyTracker : - public IntrusiveCounterUnsigned { - public: - void addDependency(const string &fieldPath, - const DocumentSource *pSource); - - void removeDependency(const string &fieldPath); - - bool getDependency(intrusive_ptr<const DocumentSource> *ppSource, - const string &fieldPath) const; - - private: - struct Tracker { - Tracker(const string &fieldPath, - const DocumentSource *pSource); - - string fieldPath; - intrusive_ptr<const DocumentSource> pSource; - - struct Hash : - unary_function<string, size_t> { - size_t operator()(const string &rS) const; - }; - }; - - typedef boost::unordered_map<string, Tracker, Tracker::Hash> MapType; - MapType map; - }; - -} - -/* ======================= PRIVATE IMPLEMENTATIONS ========================== */ - -namespace mongo { - - inline size_t DependencyTracker::Tracker::Hash::operator()( - const string &rS) const { - size_t seed = 0xf0afbeef; - boost::hash_combine(seed, rS); - return seed; - } - -} diff --git a/src/mongo/db/pipeline/document.cpp b/src/mongo/db/pipeline/document.cpp index 1b856c86476..e34af40b8dd 100755 --- a/src/mongo/db/pipeline/document.cpp +++ b/src/mongo/db/pipeline/document.cpp @@ -17,7 +17,6 @@ #include "pch.h" #include <boost/functional/hash.hpp> #include "db/jsobj.h" -#include "db/pipeline/dependency_tracker.h" #include "db/pipeline/document.h" #include "db/pipeline/value.h" #include "util/mongoutils/str.h" @@ -27,17 +26,11 @@ namespace mongo { string Document::idName("_id"); - intrusive_ptr<Document> Document::createFromBsonObj( - BSONObj *pBsonObj, const DependencyTracker *pDependencies) { - intrusive_ptr<Document> pDocument( - new Document(pBsonObj, pDependencies)); - return pDocument; + intrusive_ptr<Document> Document::createFromBsonObj(BSONObj* pBsonObj) { + return new Document(pBsonObj); } - Document::Document(BSONObj *pBsonObj, - const DependencyTracker *pDependencies): - vFieldName(), - vpValue() { + Document::Document(BSONObj* pBsonObj) { const int fields = pBsonObj->nFields(); vFieldName.reserve(fields); vpValue.reserve(fields); @@ -46,7 +39,6 @@ namespace mongo { BSONElement bsonElement(bsonIterator.next()); string fieldName(bsonElement.fieldName()); - // LATER check pDependencies // LATER grovel through structures??? intrusive_ptr<const Value> pValue( Value::createFromBsonElement(&bsonElement)); @@ -56,7 +48,7 @@ namespace mongo { } } - void Document::toBson(BSONObjBuilder *pBuilder) const { + void Document::toBson(BSONObjBuilder* pBuilder) const { const size_t n = vFieldName.size(); for(size_t i = 0; i < n; ++i) vpValue[i]->addToBsonObj(pBuilder, vFieldName[i]); diff --git a/src/mongo/db/pipeline/document.h b/src/mongo/db/pipeline/document.h index 65670fcd08e..1e5cd07ea39 100755 --- a/src/mongo/db/pipeline/document.h +++ b/src/mongo/db/pipeline/document.h @@ -22,7 +22,6 @@ namespace mongo { class BSONObj; - class DependencyTracker; class FieldIterator; class Value; @@ -37,14 +36,9 @@ namespace mongo { Document field values may be pointed to in the BSONObj, so it must live at least as long as the resulting Document. - LATER - use an abstract class for the dependencies; something like - a "lookup(const string &fieldName)" so there can be other - implementations. - @returns shared pointer to the newly created Document */ - static intrusive_ptr<Document> createFromBsonObj( - BSONObj *pBsonObj, const DependencyTracker *pDependencies = NULL); + static intrusive_ptr<Document> createFromBsonObj(BSONObj* pBsonObj); /* Create a new empty Document. @@ -193,7 +187,7 @@ namespace mongo { friend class FieldIterator; Document(size_t sizeHint); - Document(BSONObj *pBsonObj, const DependencyTracker *pDependencies); + Document(BSONObj* pBsonObj); /* these two vectors parallel each other */ vector<string> vFieldName; diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp index 24eb82abfa7..045ff4c3726 100755 --- a/src/mongo/db/pipeline/document_source.cpp +++ b/src/mongo/db/pipeline/document_source.cpp @@ -50,13 +50,6 @@ namespace mongo { void DocumentSource::optimize() { } - void DocumentSource::manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker) { -#ifdef MONGO_LATER_SERVER_4644 - verify(false); // identify any sources that need this but don't have it -#endif /* MONGO_LATER_SERVER_4644 */ - } - bool DocumentSource::advance() { pExpCtx->checkForInterrupt(); // might not return return false; diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h index a86fc428a43..7ecce2cadf5 100755 --- a/src/mongo/db/pipeline/document_source.h +++ b/src/mongo/db/pipeline/document_source.h @@ -22,7 +22,6 @@ #include "util/intrusive_counter.h" #include "db/clientcursor.h" #include "db/jsobj.h" -#include "db/pipeline/dependency_tracker.h" #include "db/pipeline/document.h" #include "db/pipeline/expression.h" #include "mongo/db/pipeline/expression_context.h" @@ -33,7 +32,6 @@ namespace mongo { class Accumulator; class Cursor; - class DependencyTracker; class Document; class Expression; class ExpressionContext; @@ -159,17 +157,6 @@ namespace mongo { */ virtual void optimize(); - /** - Adjust dependencies according to the needs of this source. - - $$$ MONGO_LATER_SERVER_4644 - @param pTracker the dependency tracker - - Note, this function doesn't affect anything but is currently called by stub code - */ - virtual void manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker); - enum GetDepsReturn { NOT_SUPPORTED, // This means the set should be ignored EXAUSTIVE, // This means that everything needed should be in the set @@ -180,8 +167,6 @@ namespace mongo { * Deps should be in "a.b.c" notation * * @param deps results are added here. NOT CLEARED - * - * Note: this is a simplified form of manageDependencies() */ virtual GetDepsReturn getDependencies(set<string>& deps) const { return NOT_SUPPORTED; @@ -389,8 +374,6 @@ namespace mongo { virtual bool advance(); virtual intrusive_ptr<Document> getCurrent(); virtual void setSource(DocumentSource *pSource); - virtual void manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker); /** * Release the Cursor and the read lock it requires, but without changing the other data. @@ -486,14 +469,6 @@ namespace mongo { behavior of most other operations, see SERVER-2454. */ void yieldSometimes(); - - /* - This document source hangs on to the dependency tracker when it - gets it so that it can be used for selective reification of - fields in order to avoid fields that are not required through the - pipeline. - */ - intrusive_ptr<DependencyTracker> pDependencies; }; @@ -732,8 +707,6 @@ namespace mongo { // virtuals from DocumentSource virtual ~DocumentSourceMatch(); virtual const char *getSourceName() const; - virtual void manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker); /** Create a filter. @@ -821,8 +794,6 @@ namespace mongo { virtual const char *getSourceName() const; virtual intrusive_ptr<Document> getCurrent(); virtual void optimize(); - virtual void manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker); virtual GetDepsReturn getDependencies(set<string>& deps) const; @@ -860,65 +831,6 @@ namespace mongo { // this is used in DEBUG builds to ensure we are compatible Projection _simpleProjection; #endif - - /* - Utility object used by manageDependencies(). - - Removes dependencies from a DependencyTracker. - */ - class DependencyRemover : - public ExpressionObject::PathSink { - public: - // virtuals from PathSink - virtual void path(const string &path, bool include); - - /* - Constructor. - - Captures a reference to the smart pointer to the DependencyTracker - that this will remove dependencies from via - ExpressionObject::emitPaths(). - - @param pTracker reference to the smart pointer to the - DependencyTracker - */ - DependencyRemover(const intrusive_ptr<DependencyTracker> &pTracker); - - private: - const intrusive_ptr<DependencyTracker> &pTracker; - }; - - /* - Utility object used by manageDependencies(). - - Checks dependencies to see if they are present. If not, then - throws a user error. - */ - class DependencyChecker : - public ExpressionObject::PathSink { - public: - // virtuals from PathSink - virtual void path(const string &path, bool include); - - /* - Constructor. - - Captures a reference to the smart pointer to the DependencyTracker - that this will check dependencies from from - ExpressionObject::emitPaths() to see if they are required. - - @param pTracker reference to the smart pointer to the - DependencyTracker - @param pThis the projection that is making this request - */ - DependencyChecker( - const intrusive_ptr<DependencyTracker> &pTracker, - const DocumentSourceProject *pThis); - - private: - const intrusive_ptr<DependencyTracker> &pTracker; - const DocumentSourceProject *pThis; - }; }; @@ -931,8 +843,6 @@ namespace mongo { virtual bool advance(); virtual const char *getSourceName() const; virtual intrusive_ptr<Document> getCurrent(); - virtual void manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker); virtual GetDepsReturn getDependencies(set<string>& deps) const; @@ -1179,8 +1089,6 @@ namespace mongo { virtual bool advance(); virtual const char *getSourceName() const; virtual intrusive_ptr<Document> getCurrent(); - virtual void manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker); virtual GetDepsReturn getDependencies(set<string>& deps) const; @@ -1249,17 +1157,4 @@ namespace mongo { const intrusive_ptr<Expression> &pExpression) { pIdExpression = pExpression; } - - inline DocumentSourceProject::DependencyRemover::DependencyRemover( - const intrusive_ptr<DependencyTracker> &pT): - pTracker(pT) { - } - - inline DocumentSourceProject::DependencyChecker::DependencyChecker( - const intrusive_ptr<DependencyTracker> &pTrack, - const DocumentSourceProject *pT): - pTracker(pTrack), - pThis(pT) { - } - } diff --git a/src/mongo/db/pipeline/document_source_match.cpp b/src/mongo/db/pipeline/document_source_match.cpp index a032e6e0e89..ba615892e61 100644 --- a/src/mongo/db/pipeline/document_source_match.cpp +++ b/src/mongo/db/pipeline/document_source_match.cpp @@ -96,11 +96,4 @@ namespace mongo { DocumentSourceFilterBase(pExpCtx), matcher(query) { } - - void DocumentSourceMatch::manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker) { -#ifdef MONGO_LATER_SERVER_4644 - verify(false); // $$$ implement dependencies on Matcher -#endif /* MONGO_LATER_SERVER_4644 */ - } } diff --git a/src/mongo/db/pipeline/document_source_project.cpp b/src/mongo/db/pipeline/document_source_project.cpp index 05b05566740..ee536637fbd 100644 --- a/src/mongo/db/pipeline/document_source_project.cpp +++ b/src/mongo/db/pipeline/document_source_project.cpp @@ -144,70 +144,4 @@ namespace mongo { pEO->addDependencies(deps, &path); return EXAUSTIVE; } - - void DocumentSourceProject::DependencyRemover::path( - const string &path, bool include) { - if (include) - pTracker->removeDependency(path); - } - - void DocumentSourceProject::DependencyChecker::path( - const string &path, bool include) { - /* if the specified path is included, there's nothing to check */ - if (include) - return; - - /* if the specified path is excluded, see if it is required */ - intrusive_ptr<const DocumentSource> pSource; - if (pTracker->getDependency(&pSource, path)) { - uassert(15984, str::stream() << - "unable to satisfy dependency on " << - FieldPath::getPrefix() << - path << " in pipeline step " << - pSource->getPipelineStep() << - " (" << pSource->getSourceName() << "), because step " << - pThis->getPipelineStep() << " (" - << pThis->getSourceName() << ") excludes it", - false); // printf() is way easier to read than this crap - } - } - - void DocumentSourceProject::manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker) { - - // the manageDependecies system is currently unused - return; - -#if 0 - /* - Look at all the products (inclusions and computed fields) of this - projection. For each one that is a dependency, remove it from the - list of dependencies, because this product will satisfy that - dependency. - */ - DependencyRemover dependencyRemover(pTracker); - pEO->emitPaths(&dependencyRemover); - - /* - Look at the exclusions of this projection. If any of them are - dependencies, inform the user (error/usassert) that the dependency - can't be satisfied. - - Note we need to do this after the product examination above because - it is possible for there to be an exclusion field name that matches - a new computed product field name. The latter would satisfy the - dependency. - */ - DependencyChecker dependencyChecker(pTracker, this); - pEO->emitPaths(&dependencyChecker); - - /* - Look at the products of this projection. For inclusions, add the - field names to the list of dependencies. For computed expressions, - add their dependencies to the list of dependencies. - */ - pEO->addDependencies(pTracker, this); -#endif - } - } diff --git a/src/mongo/db/pipeline/document_source_sort.cpp b/src/mongo/db/pipeline/document_source_sort.cpp index d1fcdb1a0e7..c21bc218738 100755 --- a/src/mongo/db/pipeline/document_source_sort.cpp +++ b/src/mongo/db/pipeline/document_source_sort.cpp @@ -19,7 +19,6 @@ #include "db/pipeline/document_source.h" #include "db/jsobj.h" -#include "db/pipeline/dependency_tracker.h" #include "db/pipeline/doc_mem_monitor.h" #include "db/pipeline/document.h" #include "db/pipeline/expression.h" @@ -221,14 +220,4 @@ namespace mongo { */ return 0; } - - void DocumentSourceSort::manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker) { - /* get the dependencies out of the matcher */ - for(SortPaths::iterator i(vSortKey.begin()); i != vSortKey.end(); ++i) { - string fieldPath((*i)->getFieldPath(false)); - pTracker->addDependency(fieldPath, this); - } - } - } diff --git a/src/mongo/db/pipeline/document_source_unwind.cpp b/src/mongo/db/pipeline/document_source_unwind.cpp index 4374d162309..00913999104 100755 --- a/src/mongo/db/pipeline/document_source_unwind.cpp +++ b/src/mongo/db/pipeline/document_source_unwind.cpp @@ -293,10 +293,4 @@ namespace mongo { return pUnwind; } - - void DocumentSourceUnwind::manageDependencies( - const intrusive_ptr<DependencyTracker> &pTracker) { - pTracker->addDependency(_unwindPath.getPath(false), this); - } - } diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp index a59c6849160..cbf7ce70690 100644 --- a/src/mongo/db/pipeline/expression.cpp +++ b/src/mongo/db/pipeline/expression.cpp @@ -20,7 +20,6 @@ #include <cstdio> #include "db/jsobj.h" #include "db/pipeline/builder.h" -#include "db/pipeline/dependency_tracker.h" #include "db/pipeline/document.h" #include "db/pipeline/expression_context.h" #include "db/pipeline/value.h" diff --git a/src/mongo/db/pipeline/expression.h b/src/mongo/db/pipeline/expression.h index b0ca869000f..10093cbbd45 100755 --- a/src/mongo/db/pipeline/expression.h +++ b/src/mongo/db/pipeline/expression.h @@ -27,7 +27,6 @@ namespace mongo { class BSONElement; class BSONObjBuilder; class Builder; - class DependencyTracker; class Document; class DocumentSource; class ExpressionContext; diff --git a/src/mongo/s/mongos.vcxproj b/src/mongo/s/mongos.vcxproj index 2850bebc0cb..4172fcb2120 100644 --- a/src/mongo/s/mongos.vcxproj +++ b/src/mongo/s/mongos.vcxproj @@ -992,7 +992,6 @@ cscript //Nologo ..\shell\createCPPfromJavaScriptFiles.js "$(ProjectDir).." <ClCompile Include="..\db\pipeline\accumulator_single_value.cpp" />
<ClCompile Include="..\db\pipeline\accumulator_sum.cpp" />
<ClCompile Include="..\db\pipeline\builder.cpp" />
- <ClCompile Include="..\db\pipeline\dependency_tracker.cpp" />
<ClCompile Include="..\db\pipeline\document.cpp" />
<ClCompile Include="..\db\pipeline\document_source.cpp" />
<ClCompile Include="..\db\pipeline\document_source_bson_array.cpp" />
@@ -1193,7 +1192,6 @@ cscript //Nologo ..\shell\createCPPfromJavaScriptFiles.js "$(ProjectDir).." <ClInclude Include="..\db\interrupt_status.h" />
<ClInclude Include="..\db\pipeline\accumulator.h" />
<ClInclude Include="..\db\pipeline\builder.h" />
- <ClInclude Include="..\db\pipeline\dependency_tracker.h" />
<ClInclude Include="..\db\pipeline\document.h" />
<ClInclude Include="..\db\pipeline\document_source.h" />
<ClInclude Include="..\db\pipeline\doc_mem_monitor.h" />
@@ -1268,4 +1266,4 @@ cscript //Nologo ..\shell\createCPPfromJavaScriptFiles.js "$(ProjectDir).." <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file +</Project>
diff --git a/src/mongo/s/mongos.vcxproj.filters b/src/mongo/s/mongos.vcxproj.filters index ca993707e4b..88469873771 100755 --- a/src/mongo/s/mongos.vcxproj.filters +++ b/src/mongo/s/mongos.vcxproj.filters @@ -507,9 +507,6 @@ <ClCompile Include="..\db\pipeline\builder.cpp">
<Filter>db\pipeline\Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\db\pipeline\dependency_tracker.cpp">
- <Filter>db\pipeline\Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\db\pipeline\doc_mem_monitor.cpp">
<Filter>db\pipeline\Source Files</Filter>
</ClCompile>
@@ -849,9 +846,6 @@ <ClInclude Include="..\db\pipeline\builder.h">
<Filter>db\pipeline\Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\db\pipeline\dependency_tracker.h">
- <Filter>db\pipeline\Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\db\pipeline\doc_mem_monitor.h">
<Filter>db\pipeline\Header Files</Filter>
</ClInclude>
@@ -1083,4 +1077,4 @@ <Filter>third_party\SpiderMonkey\Header Files</Filter>
</None>
</ItemGroup>
-</Project>
\ No newline at end of file +</Project>
|