summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer.h
diff options
context:
space:
mode:
authorKyle Suarez <kyle.suarez@mongodb.com>2018-03-21 12:19:44 -0400
committerKyle Suarez <kyle.suarez@mongodb.com>2018-03-21 12:19:44 -0400
commit0d409c4d63afb585b329187ff904be9068df9466 (patch)
treeb6e8eb10c578315f9a2a0335f9ace4b46b434489 /src/mongo/db/op_observer.h
parentc06253cf734b0d5bde34f3aadefc091bfaefcfe1 (diff)
downloadmongo-0d409c4d63afb585b329187ff904be9068df9466.tar.gz
SERVER-29051 create data files during rollback via recover to timestamp
Diffstat (limited to 'src/mongo/db/op_observer.h')
-rw-r--r--src/mongo/db/op_observer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/op_observer.h b/src/mongo/db/op_observer.h
index c8ce8ab6759..4d5254c18ec 100644
--- a/src/mongo/db/op_observer.h
+++ b/src/mongo/db/op_observer.h
@@ -31,6 +31,7 @@
#include <string>
#include "mongo/base/disallow_copying.h"
+#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/catalog/collection_options.h"
#include "mongo/db/jsobj.h"
@@ -253,6 +254,13 @@ public:
// Set of all session ids from ops being rolled back.
std::set<UUID> rollbackSessionIds = {};
+ // Maps UUIDs to a set of BSONObjs containing the _ids of the documents that will be deleted
+ // from that collection due to rollback, and is used to populate rollback files.
+ // For simplicity, this BSONObj set uses the simple binary comparison, as it is never wrong
+ // to consider two _ids as distinct even if the collection default collation would put them
+ // in the same equivalence class.
+ stdx::unordered_map<UUID, SimpleBSONObjUnorderedSet, UUID::Hash> rollbackDeletedIdsMap;
+
// True if the shard identity document was rolled back.
bool shardIdentityRolledBack = false;
};