diff options
author | Josef Ahmad <josef.ahmad@mongodb.com> | 2022-10-06 15:45:47 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-06 16:39:26 +0000 |
commit | e342fcac904a5b2ce966c15324971ff78931ac2b (patch) | |
tree | 45f8deaf46bec37eddc6c085880cd7b14bb8f18e /src/mongo/db/global_index.h | |
parent | b43174ac2adc4e4cb6a8380443644c33efd7ca13 (diff) | |
download | mongo-e342fcac904a5b2ce966c15324971ff78931ac2b.tar.gz |
SERVER-70225 Replicate global index key writes as timestamped writes
Diffstat (limited to 'src/mongo/db/global_index.h')
-rw-r--r-- | src/mongo/db/global_index.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/db/global_index.h b/src/mongo/db/global_index.h index b93fb439547..c4a2718c8ed 100644 --- a/src/mongo/db/global_index.h +++ b/src/mongo/db/global_index.h @@ -70,6 +70,14 @@ void insertKey(OperationContext* opCtx, const UUID& indexUUID, const BSONObj& key, const BSONObj& docKey); +/** + * Variant of the above where the lock for the global index container is already granted. Unlike + * the above, this variant requires the call to be wrapped inside a writeConflictRetry. + */ +void insertKey(OperationContext* opCtx, + const CollectionPtr& container, + const BSONObj& key, + const BSONObj& docKey); /** * Deletes a key from the global index container identified by UUID. Replicates as an 'xd' command. @@ -81,4 +89,13 @@ void deleteKey(OperationContext* opCtx, const BSONObj& key, const BSONObj& docKey); +/** + * Variant of the above where the lock for the global index container is already granted. Unlike + * the above, this variant requires the call to be wrapped inside a writeConflictRetry. + */ +void deleteKey(OperationContext* opCtx, + const CollectionPtr& container, + const BSONObj& key, + const BSONObj& docKey); + } // namespace mongo::global_index |