summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/background.cpp2
-rw-r--r--src/mongo/db/catalog/index_create.h1
-rw-r--r--src/mongo/db/commands/pipeline_command.cpp2
-rw-r--r--src/mongo/db/concurrency/lock_state_test.cpp5
-rw-r--r--src/mongo/db/exec/pipeline_proxy.cpp3
-rw-r--r--src/mongo/db/exec/pipeline_proxy.h1
-rw-r--r--src/mongo/db/fts/stop_words.cpp3
-rw-r--r--src/mongo/db/index/2d_common.h3
-rw-r--r--src/mongo/db/matcher/expression_geo.h6
-rw-r--r--src/mongo/db/pipeline/document_source.h5
-rw-r--r--src/mongo/db/pipeline/document_source_cursor.cpp3
-rw-r--r--src/mongo/db/pipeline/document_source_group.cpp1
-rw-r--r--src/mongo/db/pipeline/pipeline_d.cpp2
-rw-r--r--src/mongo/db/pipeline/value.h2
-rw-r--r--src/mongo/db/projection.cpp3
-rw-r--r--src/mongo/db/projection.h3
-rw-r--r--src/mongo/db/query/canonical_query.cpp1
-rw-r--r--src/mongo/db/query/plan_executor.cpp4
-rw-r--r--src/mongo/db/repl/master_slave.cpp3
-rw-r--r--src/mongo/db/repl/master_slave.h6
-rw-r--r--src/mongo/db/repl/multicmd.h7
-rw-r--r--src/mongo/db/repl/oplogreader.cpp2
-rw-r--r--src/mongo/db/repl/oplogreader.h6
-rw-r--r--src/mongo/db/repl/rs_rollback.cpp5
-rw-r--r--src/mongo/db/sorter/sorter.cpp3
-rw-r--r--src/mongo/db/sorter/sorter.h1
-rw-r--r--src/mongo/db/sorter/sorter_test.cpp1
-rw-r--r--src/mongo/db/storage/devnull/devnull_kv_engine.h2
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp4
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp5
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_record_store.cpp5
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp3
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_recovery_unit.h1
-rw-r--r--src/mongo/db/storage/mmap_v1/dur.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_commitjob.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_commitjob.h7
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp5
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_recover.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_recover.h1
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.h2
-rw-r--r--src/mongo/db/storage/rocks/rocks_engine.cpp2
-rw-r--r--src/mongo/db/storage/rocks/rocks_record_store.cpp3
-rw-r--r--src/mongo/db/storage/rocks/rocks_record_store.h1
-rw-r--r--src/mongo/db/storage/rocks/rocks_record_store_test.cpp2
-rw-r--r--src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp2
-rw-r--r--src/mongo/db/storage/rocks/rocks_sorted_data_impl.h1
-rw-r--r--src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp1
48 files changed, 125 insertions, 17 deletions
diff --git a/src/mongo/db/background.cpp b/src/mongo/db/background.cpp
index d3449915f61..4d8b474e6c1 100644
--- a/src/mongo/db/background.cpp
+++ b/src/mongo/db/background.cpp
@@ -45,6 +45,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace {
class BgInfo {
diff --git a/src/mongo/db/catalog/index_create.h b/src/mongo/db/catalog/index_create.h
index a94f0fddeeb..4a4be247e77 100644
--- a/src/mongo/db/catalog/index_create.h
+++ b/src/mongo/db/catalog/index_create.h
@@ -31,6 +31,7 @@
#pragma once
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <set>
#include <string>
#include <vector>
diff --git a/src/mongo/db/commands/pipeline_command.cpp b/src/mongo/db/commands/pipeline_command.cpp
index 11d740f29bd..848e94b7df8 100644
--- a/src/mongo/db/commands/pipeline_command.cpp
+++ b/src/mongo/db/commands/pipeline_command.cpp
@@ -29,6 +29,7 @@
#include "mongo/platform/basic.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <vector>
#include "mongo/db/auth/action_set.h"
@@ -55,6 +56,7 @@ namespace mongo {
using boost::intrusive_ptr;
using boost::scoped_ptr;
+ using boost::shared_ptr;
static bool isCursorCommand(BSONObj cmdObj) {
BSONElement cursorElem = cmdObj["cursor"];
diff --git a/src/mongo/db/concurrency/lock_state_test.cpp b/src/mongo/db/concurrency/lock_state_test.cpp
index da26040d83f..6fb79500c42 100644
--- a/src/mongo/db/concurrency/lock_state_test.cpp
+++ b/src/mongo/db/concurrency/lock_state_test.cpp
@@ -30,6 +30,7 @@
#include "mongo/platform/basic.h"
+#include <boost/shared_ptr.hpp>
#include <vector>
#include "mongo/db/concurrency/lock_manager_test_help.h"
@@ -41,7 +42,9 @@ namespace mongo {
namespace {
const int NUM_PERF_ITERS = 1000*1000; // numeber of iterations to use for lock perf
}
-
+
+ using boost::shared_ptr;
+
TEST(LockerImpl, LockNoConflict) {
const ResourceId resId(RESOURCE_COLLECTION, std::string("TestDB.collection"));
diff --git a/src/mongo/db/exec/pipeline_proxy.cpp b/src/mongo/db/exec/pipeline_proxy.cpp
index 2fd6ba8abc8..ca97e7a962b 100644
--- a/src/mongo/db/exec/pipeline_proxy.cpp
+++ b/src/mongo/db/exec/pipeline_proxy.cpp
@@ -30,12 +30,15 @@
#include "mongo/db/exec/pipeline_proxy.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/pipeline/document_source.h"
#include "mongo/db/pipeline/expression_context.h"
namespace mongo {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
PipelineProxyStage::PipelineProxyStage(intrusive_ptr<Pipeline> pipeline,
const boost::shared_ptr<PlanExecutor>& child,
diff --git a/src/mongo/db/exec/pipeline_proxy.h b/src/mongo/db/exec/pipeline_proxy.h
index 9b340653725..d1eb5b4d25c 100644
--- a/src/mongo/db/exec/pipeline_proxy.h
+++ b/src/mongo/db/exec/pipeline_proxy.h
@@ -30,6 +30,7 @@
#include <boost/optional/optional.hpp>
#include <boost/intrusive_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include "mongo/db/catalog/collection.h"
diff --git a/src/mongo/db/fts/stop_words.cpp b/src/mongo/db/fts/stop_words.cpp
index 0dbd5f47dcf..66240a1ce2d 100644
--- a/src/mongo/db/fts/stop_words.cpp
+++ b/src/mongo/db/fts/stop_words.cpp
@@ -28,6 +28,7 @@
* it in the license file.
*/
+#include <boost/shared_ptr.hpp>
#include <set>
#include <string>
@@ -40,6 +41,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace fts {
void loadStopWordMap( StringMap< std::set< std::string > >* m );
diff --git a/src/mongo/db/index/2d_common.h b/src/mongo/db/index/2d_common.h
index dd2dc6faff3..d237c18a1b2 100644
--- a/src/mongo/db/index/2d_common.h
+++ b/src/mongo/db/index/2d_common.h
@@ -28,6 +28,7 @@
#pragma once
+#include <boost/shared_ptr.hpp>
#include <string>
#include <vector>
@@ -38,7 +39,7 @@ namespace mongo {
struct TwoDIndexingParams {
std::string geo;
std::vector<std::pair<std::string, int> > other;
- shared_ptr<GeoHashConverter> geoHashConverter;
+ boost::shared_ptr<GeoHashConverter> geoHashConverter;
};
} // namespace mongo
diff --git a/src/mongo/db/matcher/expression_geo.h b/src/mongo/db/matcher/expression_geo.h
index c6956712280..4dbf1bb65bf 100644
--- a/src/mongo/db/matcher/expression_geo.h
+++ b/src/mongo/db/matcher/expression_geo.h
@@ -31,6 +31,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/geo/geometry_container.h"
#include "mongo/db/matcher/expression.h"
#include "mongo/db/matcher/expression_leaf.h"
@@ -99,7 +101,7 @@ namespace mongo {
private:
BSONObj _rawObj;
// Share ownership of our query with all of our clones
- shared_ptr<const GeoExpression> _query;
+ boost::shared_ptr<const GeoExpression> _query;
};
@@ -168,7 +170,7 @@ namespace mongo {
private:
BSONObj _rawObj;
// Share ownership of our query with all of our clones
- shared_ptr<const GeoNearExpression> _query;
+ boost::shared_ptr<const GeoNearExpression> _query;
};
} // namespace mongo
diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h
index 52900cfaa42..5d7e13cfbfb 100644
--- a/src/mongo/db/pipeline/document_source.h
+++ b/src/mongo/db/pipeline/document_source.h
@@ -36,6 +36,7 @@
#include <boost/optional.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/unordered_map.hpp>
#include <deque>
@@ -245,7 +246,7 @@ namespace mongo {
virtual ~DocumentSourceNeedsMongod() {}
// Gives subclasses access to a MongodInterface implementation
- shared_ptr<MongodInterface> _mongod;
+ boost::shared_ptr<MongodInterface> _mongod;
};
@@ -493,7 +494,7 @@ namespace mongo {
DocumentSourceGroup(const boost::intrusive_ptr<ExpressionContext> &pExpCtx);
/// Spill groups map to disk and returns an iterator to the file.
- shared_ptr<Sorter<Value, Value>::Iterator> spill();
+ boost::shared_ptr<Sorter<Value, Value>::Iterator> spill();
// Only used by spill. Would be function-local if that were legal in C++03.
class SpillSTLComparator;
diff --git a/src/mongo/db/pipeline/document_source_cursor.cpp b/src/mongo/db/pipeline/document_source_cursor.cpp
index e2a14bcfc43..5c17b373a01 100644
--- a/src/mongo/db/pipeline/document_source_cursor.cpp
+++ b/src/mongo/db/pipeline/document_source_cursor.cpp
@@ -30,6 +30,8 @@
#include "mongo/db/pipeline/document_source.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/catalog/database_holder.h"
#include "mongo/db/exec/working_set_common.h"
#include "mongo/db/instance.h"
@@ -43,6 +45,7 @@
namespace mongo {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
DocumentSourceCursor::~DocumentSourceCursor() {
dispose();
diff --git a/src/mongo/db/pipeline/document_source_group.cpp b/src/mongo/db/pipeline/document_source_group.cpp
index ed587a32e7e..42116be2be3 100644
--- a/src/mongo/db/pipeline/document_source_group.cpp
+++ b/src/mongo/db/pipeline/document_source_group.cpp
@@ -43,6 +43,7 @@
namespace mongo {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
const char DocumentSourceGroup::groupName[] = "$group";
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp
index 9d20b98a6e3..21c075ba1c6 100644
--- a/src/mongo/db/pipeline/pipeline_d.cpp
+++ b/src/mongo/db/pipeline/pipeline_d.cpp
@@ -31,6 +31,7 @@
#include "mongo/db/pipeline/pipeline_d.h"
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/client/dbclientinterface.h"
#include "mongo/db/catalog/collection.h"
@@ -45,6 +46,7 @@
namespace mongo {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
namespace {
class MongodImplementation : public DocumentSourceNeedsMongod::MongodInterface {
diff --git a/src/mongo/db/pipeline/value.h b/src/mongo/db/pipeline/value.h
index d4dd9b5899e..39303a099fe 100644
--- a/src/mongo/db/pipeline/value.h
+++ b/src/mongo/db/pipeline/value.h
@@ -28,6 +28,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/pipeline/value_internal.h"
#include "mongo/platform/unordered_set.h"
diff --git a/src/mongo/db/projection.cpp b/src/mongo/db/projection.cpp
index cb74b294f1b..1e13dae4e30 100644
--- a/src/mongo/db/projection.cpp
+++ b/src/mongo/db/projection.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/projection.h"
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/db/matcher/matcher.h"
#include "mongo/util/log.h"
@@ -41,6 +42,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
void Projection::init(const BSONObj& o,
const MatchExpressionParser::WhereCallback& whereCallback) {
massert( 10371 , "can only add to Projection once", _source.isEmpty());
diff --git a/src/mongo/db/projection.h b/src/mongo/db/projection.h
index 593af8bed5d..964f6e5fdd0 100644
--- a/src/mongo/db/projection.h
+++ b/src/mongo/db/projection.h
@@ -33,6 +33,9 @@
#include "mongo/platform/basic.h"
#include "mongo/pch.h"
#undef MONGO_PCH_WHITELISTED
+
+#include <boost/shared_ptr.hpp>
+
#include "mongo/util/string_map.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/matcher.h"
diff --git a/src/mongo/db/query/canonical_query.cpp b/src/mongo/db/query/canonical_query.cpp
index 16c683d93fe..b1e89a0f30f 100644
--- a/src/mongo/db/query/canonical_query.cpp
+++ b/src/mongo/db/query/canonical_query.cpp
@@ -39,6 +39,7 @@
namespace {
+ using boost::shared_ptr;
using std::auto_ptr;
using std::string;
using namespace mongo;
diff --git a/src/mongo/db/query/plan_executor.cpp b/src/mongo/db/query/plan_executor.cpp
index f54f835188a..da113bbe72f 100644
--- a/src/mongo/db/query/plan_executor.cpp
+++ b/src/mongo/db/query/plan_executor.cpp
@@ -28,6 +28,8 @@
#include "mongo/db/query/plan_executor.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/catalog/collection.h"
#include "mongo/db/exec/multi_plan.h"
#include "mongo/db/exec/pipeline_proxy.h"
@@ -43,6 +45,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace {
/**
diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp
index 9a72485e0d9..b58e6699e8d 100644
--- a/src/mongo/db/repl/master_slave.cpp
+++ b/src/mongo/db/repl/master_slave.cpp
@@ -45,6 +45,7 @@
#include <iostream>
#include <pcrecpp.h>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include "mongo/db/auth/authorization_manager.h"
@@ -236,7 +237,7 @@ namespace repl {
}
}
- v.push_back( shared_ptr< ReplSource >( new ReplSource( s ) ) );
+ v.push_back( boost::shared_ptr< ReplSource >( new ReplSource( s ) ) );
}
/* we reuse our existing objects so that we can keep our existing connection
diff --git a/src/mongo/db/repl/master_slave.h b/src/mongo/db/repl/master_slave.h
index f1ce83fa1a8..117e26d08a1 100644
--- a/src/mongo/db/repl/master_slave.h
+++ b/src/mongo/db/repl/master_slave.h
@@ -28,6 +28,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/repl/oplogreader.h"
/* replication data overview
@@ -75,7 +77,7 @@ namespace repl {
not done (always use main for now).
*/
class ReplSource {
- shared_ptr<threadpool::ThreadPool> tp;
+ boost::shared_ptr<threadpool::ThreadPool> tp;
void resync(OperationContext* txn, const std::string& dbName);
@@ -137,7 +139,7 @@ namespace repl {
int nClonedThisPass;
- typedef std::vector< shared_ptr< ReplSource > > SourceVector;
+ typedef std::vector< boost::shared_ptr< ReplSource > > SourceVector;
static void loadAll(OperationContext* txn, SourceVector&);
explicit ReplSource(OperationContext* txn, BSONObj);
diff --git a/src/mongo/db/repl/multicmd.h b/src/mongo/db/repl/multicmd.h
index d42dd31d92e..fa4519d4f68 100644
--- a/src/mongo/db/repl/multicmd.h
+++ b/src/mongo/db/repl/multicmd.h
@@ -30,6 +30,7 @@
#pragma once
+#include <boost/shared_ptr.hpp>
#include <list>
#include "mongo/db/jsobj.h"
@@ -66,16 +67,16 @@ namespace repl {
};
inline void multiCommand(BSONObj cmd, std::list<Target>& L) {
- std::list< shared_ptr<BackgroundJob> > jobs;
+ std::list< boost::shared_ptr<BackgroundJob> > jobs;
for( std::list<Target>::iterator i = L.begin(); i != L.end(); i++ ) {
Target& d = *i;
_MultiCommandJob *j = new _MultiCommandJob(cmd, d);
- jobs.push_back( shared_ptr<BackgroundJob>(j) );
+ jobs.push_back( boost::shared_ptr<BackgroundJob>(j) );
j->go();
}
- for( std::list< shared_ptr<BackgroundJob> >::iterator i = jobs.begin(); i != jobs.end(); i++ ) {
+ for( std::list< boost::shared_ptr<BackgroundJob> >::iterator i = jobs.begin(); i != jobs.end(); i++ ) {
(*i)->wait();
}
}
diff --git a/src/mongo/db/repl/oplogreader.cpp b/src/mongo/db/repl/oplogreader.cpp
index caaf881ec36..45089126825 100644
--- a/src/mongo/db/repl/oplogreader.cpp
+++ b/src/mongo/db/repl/oplogreader.cpp
@@ -52,6 +52,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace repl {
//number of readers created;
diff --git a/src/mongo/db/repl/oplogreader.h b/src/mongo/db/repl/oplogreader.h
index f4434e596d7..527452fd5fc 100644
--- a/src/mongo/db/repl/oplogreader.h
+++ b/src/mongo/db/repl/oplogreader.h
@@ -31,6 +31,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/client/constants.h"
#include "mongo/client/dbclientcursor.h"
#include "mongo/util/net/hostandport.h"
@@ -55,8 +57,8 @@ namespace repl {
class OplogReader {
private:
- shared_ptr<DBClientConnection> _conn;
- shared_ptr<DBClientCursor> cursor;
+ boost::shared_ptr<DBClientConnection> _conn;
+ boost::shared_ptr<DBClientCursor> cursor;
int _tailingQueryOptions;
// If _conn was actively connected, _host represents the current HostAndPort of the
diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp
index 3d46326528e..a5820837384 100644
--- a/src/mongo/db/repl/rs_rollback.cpp
+++ b/src/mongo/db/repl/rs_rollback.cpp
@@ -33,6 +33,8 @@
#include "mongo/db/repl/rs_rollback.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/authorization_manager_global.h"
#include "mongo/db/client.h"
@@ -93,6 +95,9 @@
*/
namespace mongo {
+
+ using boost::shared_ptr;
+
namespace repl {
namespace {
diff --git a/src/mongo/db/sorter/sorter.cpp b/src/mongo/db/sorter/sorter.cpp
index e4411d77a96..d3225a5ef4e 100644
--- a/src/mongo/db/sorter/sorter.cpp
+++ b/src/mongo/db/sorter/sorter.cpp
@@ -49,6 +49,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include <snappy.h>
#include "mongo/base/string_data.h"
@@ -63,6 +64,8 @@
namespace mongo {
namespace sorter {
+
+ using boost::shared_ptr;
using namespace mongoutils;
// We need to use the "real" errno everywhere, not GetLastError() on Windows
diff --git a/src/mongo/db/sorter/sorter.h b/src/mongo/db/sorter/sorter.h
index 216f7408e77..49840ddd94d 100644
--- a/src/mongo/db/sorter/sorter.h
+++ b/src/mongo/db/sorter/sorter.h
@@ -28,6 +28,7 @@
#pragma once
+#include <boost/shared_ptr.hpp>
#include <deque>
#include <fstream>
#include <string>
diff --git a/src/mongo/db/sorter/sorter_test.cpp b/src/mongo/db/sorter/sorter_test.cpp
index cb3bbf304e3..fb4cdf8a8c0 100644
--- a/src/mongo/db/sorter/sorter_test.cpp
+++ b/src/mongo/db/sorter/sorter_test.cpp
@@ -32,6 +32,7 @@
#include <boost/filesystem.hpp>
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
#include "mongo/unittest/temp_dir.h"
diff --git a/src/mongo/db/storage/devnull/devnull_kv_engine.h b/src/mongo/db/storage/devnull/devnull_kv_engine.h
index 626ce33d2ea..a1f19d53e19 100644
--- a/src/mongo/db/storage/devnull/devnull_kv_engine.h
+++ b/src/mongo/db/storage/devnull/devnull_kv_engine.h
@@ -30,6 +30,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/kv/kv_engine.h"
#include "mongo/db/storage/recovery_unit_noop.h"
diff --git a/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp b/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
index b0c53356170..0eccc2605be 100644
--- a/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/storage/in_memory/in_memory_btree_impl.h"
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include <set>
#include "mongo/db/catalog/index_catalog_entry.h"
@@ -41,6 +42,9 @@
#include "mongo/util/mongoutils/str.h"
namespace mongo {
+
+ using boost::shared_ptr;
+
namespace {
const int TempKeyMaxSize = 1024; // this goes away with SERVER-3372
diff --git a/src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp b/src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp
index c91a64ae85b..0b1a6078571 100644
--- a/src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp
@@ -29,12 +29,17 @@
*/
#include "mongo/db/storage/in_memory/in_memory_btree_impl.h"
+
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/in_memory/in_memory_recovery_unit.h"
#include "mongo/db/storage/sorted_data_interface_test_harness.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
+ using boost::shared_ptr;
+
class InMemoryHarnessHelper : public HarnessHelper {
public:
InMemoryHarnessHelper()
diff --git a/src/mongo/db/storage/in_memory/in_memory_record_store.cpp b/src/mongo/db/storage/in_memory/in_memory_record_store.cpp
index e609cb89e42..73a91181494 100644
--- a/src/mongo/db/storage/in_memory/in_memory_record_store.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_record_store.cpp
@@ -33,6 +33,8 @@
#include "mongo/db/storage/in_memory/in_memory_record_store.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/jsobj.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/oplog_hack.h"
@@ -42,6 +44,9 @@
#include "mongo/util/mongoutils/str.h"
namespace mongo {
+
+ using boost::shared_ptr;
+
class InMemoryRecordStore::InsertChange : public RecoveryUnit::Change {
public:
InsertChange(Data* data, RecordId loc) :_data(data), _loc(loc) {}
diff --git a/src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp b/src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp
index 2f291768a47..258317c8976 100644
--- a/src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp
@@ -29,6 +29,9 @@
*/
#include "mongo/db/storage/in_memory/in_memory_record_store.h"
+
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/in_memory/in_memory_recovery_unit.h"
#include "mongo/db/storage/record_store_test_harness.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/storage/in_memory/in_memory_recovery_unit.h b/src/mongo/db/storage/in_memory/in_memory_recovery_unit.h
index 28e79751436..0407f7191af 100644
--- a/src/mongo/db/storage/in_memory/in_memory_recovery_unit.h
+++ b/src/mongo/db/storage/in_memory/in_memory_recovery_unit.h
@@ -30,6 +30,7 @@
#pragma once
+#include <boost/shared_ptr.hpp>
#include <vector>
#include "mongo/db/record_id.h"
diff --git a/src/mongo/db/storage/mmap_v1/dur.cpp b/src/mongo/db/storage/mmap_v1/dur.cpp
index 566751537b4..927a22d14cb 100644
--- a/src/mongo/db/storage/mmap_v1/dur.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur.cpp
@@ -75,6 +75,7 @@
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include <iomanip>
@@ -95,6 +96,8 @@
namespace mongo {
namespace dur {
+ using boost::shared_ptr;
+
namespace {
// Used to activate the flush thread
diff --git a/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp b/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
index b063c71a3b1..0d220cabd2c 100644
--- a/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
@@ -37,6 +37,7 @@
#include "mongo/db/storage/mmap_v1/dur_commitjob.h"
+#include <boost/shared_ptr.hpp>
#include <iostream>
#include "mongo/db/client.h"
@@ -48,6 +49,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace dur {
/** base declare write intent function that all the helpers call. */
diff --git a/src/mongo/db/storage/mmap_v1/dur_commitjob.h b/src/mongo/db/storage/mmap_v1/dur_commitjob.h
index b33d60e6e51..763c880dd98 100644
--- a/src/mongo/db/storage/mmap_v1/dur_commitjob.h
+++ b/src/mongo/db/storage/mmap_v1/dur_commitjob.h
@@ -36,6 +36,7 @@
#undef MONGO_PCH_WHITELISTED
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/durop.h"
@@ -113,7 +114,7 @@ namespace mongo {
public:
std::vector<WriteIntent> _intents;
Already<127> _alreadyNoted;
- std::vector< shared_ptr<DurOp> > _durOps; // all the ops other than basic writes
+ std::vector< boost::shared_ptr<DurOp> > _durOps; // all the ops other than basic writes
/** reset the IntentsAndDurOps structure (empties all the above) */
void clear();
@@ -142,12 +143,12 @@ namespace mongo {
CommitJob();
/** note an operation other than a "basic write". threadsafe (locks in the impl) */
- void noteOp(shared_ptr<DurOp> p);
+ void noteOp(boost::shared_ptr<DurOp> p);
/** record/note an intent to write */
void note(void* p, int len);
- std::vector< shared_ptr<DurOp> >& ops() {
+ std::vector< boost::shared_ptr<DurOp> >& ops() {
groupCommitMutex.dassertLocked(); // this is what really makes the below safe
return _intentsAndDurOps._durOps;
}
diff --git a/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp b/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
index 2aaf7e0a4e8..7a845d06d90 100644
--- a/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
@@ -43,6 +43,8 @@
#include "mongo/pch.h"
#undef MONGO_PCH_WHITELISTED
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/dur_commitjob.h"
#include "mongo/db/storage/mmap_v1/dur_journal.h"
@@ -59,6 +61,9 @@
using namespace mongoutils;
namespace mongo {
+
+ using boost::shared_ptr;
+
namespace dur {
extern Journal j;
diff --git a/src/mongo/db/storage/mmap_v1/dur_recover.cpp b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
index aa1b0db7ad9..2b1964f24d5 100644
--- a/src/mongo/db/storage/mmap_v1/dur_recover.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
@@ -36,6 +36,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include <fcntl.h>
#include <iomanip>
#include <iostream>
@@ -69,6 +70,8 @@ using namespace mongoutils;
namespace mongo {
+ using boost::shared_ptr;
+
/**
* Thrown when a journal section is corrupt. This is considered OK as long as it occurs while
* processing the last file. Processing stops at the first corrupt section.
diff --git a/src/mongo/db/storage/mmap_v1/dur_recover.h b/src/mongo/db/storage/mmap_v1/dur_recover.h
index 45cf803ff13..fb921281c61 100644
--- a/src/mongo/db/storage/mmap_v1/dur_recover.h
+++ b/src/mongo/db/storage/mmap_v1/dur_recover.h
@@ -32,6 +32,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include <list>
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
diff --git a/src/mongo/db/storage/mmap_v1/durop.cpp b/src/mongo/db/storage/mmap_v1/durop.cpp
index 18c441393f8..1b9db3ac23f 100644
--- a/src/mongo/db/storage/mmap_v1/durop.cpp
+++ b/src/mongo/db/storage/mmap_v1/durop.cpp
@@ -46,10 +46,12 @@
using namespace mongoutils;
#include <boost/filesystem/operations.hpp>
+#include <boost/shared_ptr.hpp>
namespace mongo {
using boost::scoped_array;
+ using boost::shared_ptr;
namespace dur {
diff --git a/src/mongo/db/storage/mmap_v1/durop.h b/src/mongo/db/storage/mmap_v1/durop.h
index d89613a72a4..ee31780896f 100644
--- a/src/mongo/db/storage/mmap_v1/durop.h
+++ b/src/mongo/db/storage/mmap_v1/durop.h
@@ -30,6 +30,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
#include "mongo/util/bufreader.h"
#include "mongo/util/paths.h"
diff --git a/src/mongo/db/storage/rocks/rocks_engine.cpp b/src/mongo/db/storage/rocks/rocks_engine.cpp
index 94c453bf527..97d92344e01 100644
--- a/src/mongo/db/storage/rocks/rocks_engine.cpp
+++ b/src/mongo/db/storage/rocks/rocks_engine.cpp
@@ -58,6 +58,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
const std::string RocksEngine::kOrderingPrefix("indexordering-");
const std::string RocksEngine::kCollectionPrefix("collection-");
diff --git a/src/mongo/db/storage/rocks/rocks_record_store.cpp b/src/mongo/db/storage/rocks/rocks_record_store.cpp
index fec387b6e7f..21deaffbdda 100644
--- a/src/mongo/db/storage/rocks/rocks_record_store.cpp
+++ b/src/mongo/db/storage/rocks/rocks_record_store.cpp
@@ -37,6 +37,7 @@
#include <algorithm>
#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
#include <rocksdb/comparator.h>
#include <rocksdb/db.h>
@@ -55,6 +56,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace {
class CappedInsertChange : public RecoveryUnit::Change {
diff --git a/src/mongo/db/storage/rocks/rocks_record_store.h b/src/mongo/db/storage/rocks/rocks_record_store.h
index 5bcf7befb8d..5770170fe81 100644
--- a/src/mongo/db/storage/rocks/rocks_record_store.h
+++ b/src/mongo/db/storage/rocks/rocks_record_store.h
@@ -33,6 +33,7 @@
#include <atomic>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <string>
#include <memory>
#include <vector>
diff --git a/src/mongo/db/storage/rocks/rocks_record_store_test.cpp b/src/mongo/db/storage/rocks/rocks_record_store_test.cpp
index 16883e7e401..2d40ee3aa4e 100644
--- a/src/mongo/db/storage/rocks/rocks_record_store_test.cpp
+++ b/src/mongo/db/storage/rocks/rocks_record_store_test.cpp
@@ -33,6 +33,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <rocksdb/comparator.h>
#include <rocksdb/db.h>
@@ -50,6 +51,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using boost::shared_ptr;
class RocksRecordStoreHarnessHelper : public HarnessHelper {
public:
diff --git a/src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp b/src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp
index 188d5ee1280..dc57f33badc 100644
--- a/src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp
+++ b/src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/storage/rocks/rocks_sorted_data_impl.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <cstdlib>
#include <string>
@@ -52,6 +53,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using boost::shared_ptr;
namespace {
diff --git a/src/mongo/db/storage/rocks/rocks_sorted_data_impl.h b/src/mongo/db/storage/rocks/rocks_sorted_data_impl.h
index 49a78e4d2f3..0ba44b1e7fc 100644
--- a/src/mongo/db/storage/rocks/rocks_sorted_data_impl.h
+++ b/src/mongo/db/storage/rocks/rocks_sorted_data_impl.h
@@ -31,6 +31,7 @@
#include "mongo/db/storage/sorted_data_interface.h"
#include <atomic>
+#include <boost/shared_ptr.hpp>
#include <string>
#include <rocksdb/db.h>
diff --git a/src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp b/src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp
index 4a266c2efed..1572278cc90 100644
--- a/src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp
+++ b/src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp
@@ -47,6 +47,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using boost::shared_ptr;
class RocksSortedDataImplHarness : public HarnessHelper {
public: