summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/index/2d_access_method.cpp4
-rw-r--r--src/mongo/db/index/2d_access_method.h4
-rw-r--r--src/mongo/db/index/btree_access_method.cpp4
-rw-r--r--src/mongo/db/index/btree_access_method.h4
-rw-r--r--src/mongo/db/index/fts_access_method.cpp4
-rw-r--r--src/mongo/db/index/fts_access_method.h4
-rw-r--r--src/mongo/db/index/hash_access_method.cpp4
-rw-r--r--src/mongo/db/index/hash_access_method.h4
-rw-r--r--src/mongo/db/index/haystack_access_method.cpp4
-rw-r--r--src/mongo/db/index/haystack_access_method.h4
-rw-r--r--src/mongo/db/index/index_access_method.cpp10
-rw-r--r--src/mongo/db/index/index_access_method.h4
-rw-r--r--src/mongo/db/index/s2_access_method.cpp4
-rw-r--r--src/mongo/db/index/s2_access_method.h4
-rw-r--r--src/mongo/db/index/wildcard_access_method.cpp4
-rw-r--r--src/mongo/db/index/wildcard_access_method.h4
16 files changed, 54 insertions, 16 deletions
diff --git a/src/mongo/db/index/2d_access_method.cpp b/src/mongo/db/index/2d_access_method.cpp
index f70e128f92d..71d6d53a8d4 100644
--- a/src/mongo/db/index/2d_access_method.cpp
+++ b/src/mongo/db/index/2d_access_method.cpp
@@ -50,7 +50,9 @@ TwoDAccessMethod::TwoDAccessMethod(IndexCatalogEntry* btreeState,
}
/** Finds the key objects to put in an index */
-void TwoDAccessMethod::doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+void TwoDAccessMethod::doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/2d_access_method.h b/src/mongo/db/index/2d_access_method.h
index 59a777c356f..3dd48993a07 100644
--- a/src/mongo/db/index/2d_access_method.h
+++ b/src/mongo/db/index/2d_access_method.h
@@ -58,7 +58,9 @@ private:
* This function ignores the 'multikeyPaths' and 'multikeyMetadataKeys' pointers because 2d
* indexes don't support tracking path-level multikey information.
*/
- void doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+ void doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/btree_access_method.cpp b/src/mongo/db/index/btree_access_method.cpp
index 9d2f8bfd755..726fec48a51 100644
--- a/src/mongo/db/index/btree_access_method.cpp
+++ b/src/mongo/db/index/btree_access_method.cpp
@@ -65,7 +65,9 @@ BtreeAccessMethod::BtreeAccessMethod(IndexCatalogEntry* btreeState,
getSortedDataInterface()->getOrdering());
}
-void BtreeAccessMethod::doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+void BtreeAccessMethod::doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/btree_access_method.h b/src/mongo/db/index/btree_access_method.h
index b6e64b10a94..c9af3acb362 100644
--- a/src/mongo/db/index/btree_access_method.h
+++ b/src/mongo/db/index/btree_access_method.h
@@ -48,7 +48,9 @@ public:
BtreeAccessMethod(IndexCatalogEntry* btreeState, std::unique_ptr<SortedDataInterface> btree);
private:
- void doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+ void doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/fts_access_method.cpp b/src/mongo/db/index/fts_access_method.cpp
index 7574cb2885b..7f688fd2854 100644
--- a/src/mongo/db/index/fts_access_method.cpp
+++ b/src/mongo/db/index/fts_access_method.cpp
@@ -39,7 +39,9 @@ FTSAccessMethod::FTSAccessMethod(IndexCatalogEntry* btreeState,
: AbstractIndexAccessMethod(btreeState, std::move(btree)),
_ftsSpec(btreeState->descriptor()->infoObj()) {}
-void FTSAccessMethod::doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+void FTSAccessMethod::doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/fts_access_method.h b/src/mongo/db/index/fts_access_method.h
index 26648f90f84..35b3a8937f4 100644
--- a/src/mongo/db/index/fts_access_method.h
+++ b/src/mongo/db/index/fts_access_method.h
@@ -52,7 +52,9 @@ private:
* This function ignores the 'multikeyPaths' and 'multikeyMetadataKeys' pointers because text
* indexes don't support tracking path-level multikey information.
*/
- void doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+ void doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/hash_access_method.cpp b/src/mongo/db/index/hash_access_method.cpp
index 5075c7d33fa..02079293a01 100644
--- a/src/mongo/db/index/hash_access_method.cpp
+++ b/src/mongo/db/index/hash_access_method.cpp
@@ -49,7 +49,9 @@ HashAccessMethod::HashAccessMethod(IndexCatalogEntry* btreeState,
_collator = btreeState->getCollator();
}
-void HashAccessMethod::doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+void HashAccessMethod::doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/hash_access_method.h b/src/mongo/db/index/hash_access_method.h
index 4d5775d9eba..1e06d34a9c8 100644
--- a/src/mongo/db/index/hash_access_method.h
+++ b/src/mongo/db/index/hash_access_method.h
@@ -55,7 +55,9 @@ private:
* This function ignores the 'multikeyPaths' and 'multikeyMetadataKeys' pointers because hashed
* indexes don't support tracking path-level multikey information.
*/
- void doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+ void doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/haystack_access_method.cpp b/src/mongo/db/index/haystack_access_method.cpp
index 7cd26382182..22549fd96b7 100644
--- a/src/mongo/db/index/haystack_access_method.cpp
+++ b/src/mongo/db/index/haystack_access_method.cpp
@@ -62,7 +62,9 @@ HaystackAccessMethod::HaystackAccessMethod(IndexCatalogEntry* btreeState,
uassert(16774, "no non-geo fields specified", _otherFields.size());
}
-void HaystackAccessMethod::doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+void HaystackAccessMethod::doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/haystack_access_method.h b/src/mongo/db/index/haystack_access_method.h
index f4aaa6a39a8..9a2e81749c1 100644
--- a/src/mongo/db/index/haystack_access_method.h
+++ b/src/mongo/db/index/haystack_access_method.h
@@ -67,7 +67,9 @@ private:
* This function ignores the 'multikeyPaths' and 'multikeyMetadataKeys' pointers because
* geoHaystack indexes don't support tracking path-level multikey information.
*/
- void doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+ void doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/index_access_method.cpp b/src/mongo/db/index/index_access_method.cpp
index a3d2ea5b1c9..10df321f252 100644
--- a/src/mongo/db/index/index_access_method.cpp
+++ b/src/mongo/db/index/index_access_method.cpp
@@ -836,7 +836,15 @@ void AbstractIndexAccessMethod::getKeys(OperationContext* opCtx,
id->toString()));
try {
- doGetKeys(pooledBufferBuilder, obj, context, keys, multikeyMetadataKeys, multikeyPaths, id);
+ doGetKeys(opCtx,
+ collection,
+ pooledBufferBuilder,
+ obj,
+ context,
+ keys,
+ multikeyMetadataKeys,
+ multikeyPaths,
+ id);
} catch (const AssertionException& ex) {
// Suppress all indexing errors when mode is kRelaxConstraints.
if (mode == GetKeysMode::kEnforceConstraints) {
diff --git a/src/mongo/db/index/index_access_method.h b/src/mongo/db/index/index_access_method.h
index 4005b07ee4b..d7317af6c0d 100644
--- a/src/mongo/db/index/index_access_method.h
+++ b/src/mongo/db/index/index_access_method.h
@@ -582,7 +582,9 @@ protected:
* keys are not associated with the document itself, but instead represent multi-key path
* information that must be stored in a reserved keyspace within the index.
*/
- virtual void doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+ virtual void doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/s2_access_method.cpp b/src/mongo/db/index/s2_access_method.cpp
index f435ff7f70f..73478ddcd2e 100644
--- a/src/mongo/db/index/s2_access_method.cpp
+++ b/src/mongo/db/index/s2_access_method.cpp
@@ -127,7 +127,9 @@ StatusWith<BSONObj> S2AccessMethod::fixSpec(const BSONObj& specObj) {
return specObj;
}
-void S2AccessMethod::doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+void S2AccessMethod::doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/s2_access_method.h b/src/mongo/db/index/s2_access_method.h
index 9f21e9b9cf7..a849753ee28 100644
--- a/src/mongo/db/index/s2_access_method.h
+++ b/src/mongo/db/index/s2_access_method.h
@@ -64,7 +64,9 @@ private:
* and fills each element with the prefixes of the indexed field that would cause this index to
* be multikey as a result of inserting 'keys'.
*/
- void doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+ void doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/wildcard_access_method.cpp b/src/mongo/db/index/wildcard_access_method.cpp
index a2b2cb5bd0f..4bbd36149e2 100644
--- a/src/mongo/db/index/wildcard_access_method.cpp
+++ b/src/mongo/db/index/wildcard_access_method.cpp
@@ -61,7 +61,9 @@ bool WildcardAccessMethod::shouldMarkIndexAsMultikey(size_t numberOfKeys,
return !multikeyMetadataKeys.empty();
}
-void WildcardAccessMethod::doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+void WildcardAccessMethod::doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,
diff --git a/src/mongo/db/index/wildcard_access_method.h b/src/mongo/db/index/wildcard_access_method.h
index b4d1bdbdb34..bdc02f8dc9b 100644
--- a/src/mongo/db/index/wildcard_access_method.h
+++ b/src/mongo/db/index/wildcard_access_method.h
@@ -67,7 +67,9 @@ public:
}
private:
- void doGetKeys(SharedBufferFragmentBuilder& pooledBufferBuilder,
+ void doGetKeys(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ SharedBufferFragmentBuilder& pooledBufferBuilder,
const BSONObj& obj,
GetKeysContext context,
KeyStringSet* keys,