summaryrefslogtreecommitdiff
path: root/src/mongo/s/write_ops/bulk_write_exec.h
diff options
context:
space:
mode:
authorkauboy26 <vishnu.kaushik@mongodb.com>2023-05-17 19:18:56 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-17 20:37:02 +0000
commita5e8b7dada69c783873940d6f0723e99480626ad (patch)
treeb006ffc941a68f82f77263b5a424791a31e3e175 /src/mongo/s/write_ops/bulk_write_exec.h
parentd2a24d73cb763b1564c8907bf293c467aabb5b6c (diff)
downloadmongo-a5e8b7dada69c783873940d6f0723e99480626ad.tar.gz
SERVER-72792 implement basic progress tracking for individual operations in bulkWrite
Diffstat (limited to 'src/mongo/s/write_ops/bulk_write_exec.h')
-rw-r--r--src/mongo/s/write_ops/bulk_write_exec.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/s/write_ops/bulk_write_exec.h b/src/mongo/s/write_ops/bulk_write_exec.h
index 51d862ad3f9..745312025bc 100644
--- a/src/mongo/s/write_ops/bulk_write_exec.h
+++ b/src/mongo/s/write_ops/bulk_write_exec.h
@@ -32,6 +32,7 @@
#include "mongo/bson/timestamp.h"
#include "mongo/client/connection_string.h"
#include "mongo/db/commands/bulk_write_gen.h"
+#include "mongo/db/commands/bulk_write_parser.h"
#include "mongo/db/repl/optime.h"
#include "mongo/s/ns_targeter.h"
#include "mongo/s/write_ops/batch_write_op.h"
@@ -127,8 +128,14 @@ public:
*/
void abortBatch(const Status& status);
- // TODO(SERVER-72792): Finish this and process real batch responses.
- void noteBatchResponse(const TargetedWriteBatch& targetedBatch);
+ /**
+ * Processes the response to a TargetedWriteBatch. The response is captured by the vector of
+ * BulkWriteReplyItems. Sharding related errors are then grouped by namespace and captured in
+ * the map passed in.
+ */
+ void noteBatchResponse(TargetedWriteBatch& targetedBatch,
+ const std::vector<BulkWriteReplyItem>& replyItems,
+ stdx::unordered_map<NamespaceString, TrackedErrors>& errorsPerNamespace);
/**
* Returns a vector of BulkWriteReplyItem based on the end state of each individual write in