summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog/sharding_catalog_client.h
diff options
context:
space:
mode:
authorBlake Oler <blake.oler@mongodb.com>2019-04-09 18:08:53 -0400
committerBlake Oler <blake.oler@mongodb.com>2019-04-16 15:57:30 -0400
commit29ef1a415c74c883746325f13a8eaaa1831f8102 (patch)
tree13ce885258c58747b604a226215bdaca535361a5 /src/mongo/s/catalog/sharding_catalog_client.h
parente984f9781d2947e3b1fc10ae8535d630c49b5e94 (diff)
downloadmongo-29ef1a415c74c883746325f13a8eaaa1831f8102.tar.gz
SERVER-40346 Use AlternativeSessionRegion to insert config documents as retryable write
Diffstat (limited to 'src/mongo/s/catalog/sharding_catalog_client.h')
-rw-r--r--src/mongo/s/catalog/sharding_catalog_client.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/s/catalog/sharding_catalog_client.h b/src/mongo/s/catalog/sharding_catalog_client.h
index cb16b5d26f9..febbf82fe06 100644
--- a/src/mongo/s/catalog/sharding_catalog_client.h
+++ b/src/mongo/s/catalog/sharding_catalog_client.h
@@ -322,6 +322,19 @@ public:
const WriteConcernOptions& writeConcern) = 0;
/**
+ * Directly inserts documents in the specified namespace on the config server. Inserts said
+ * documents using a retryable write. Underneath, a session is created and destroyed -- this
+ * ad-hoc session creation strategy should never be used outside of specific, non-performant
+ * code paths.
+ *
+ * Must only be used for insertions in the 'config' database.
+ */
+ virtual void insertConfigDocumentsAsRetryableWrite(OperationContext* opCtx,
+ const NamespaceString& nss,
+ std::vector<BSONObj> docs,
+ const WriteConcernOptions& writeConcern) = 0;
+
+ /**
* Updates a single document in the specified namespace on the config server. The document must
* have an _id index. Must only be used for updates to the 'config' database.
*