diff options
author | Benety Goh <benety@mongodb.com> | 2017-07-18 06:55:52 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2017-07-21 11:51:57 -0400 |
commit | 056e90b4fb8d6d50c011cbeb655bed3fdc0d9b0f (patch) | |
tree | a6bcc45d8974e8d6b3efc0fce9bfdce788ba834a /src/mongo/db/repl/drop_pending_collection_reaper.h | |
parent | 301bfb35d7008f60586aeed00dd67087ad4254c0 (diff) | |
download | mongo-056e90b4fb8d6d50c011cbeb655bed3fdc0d9b0f.tar.gz |
SERVER-30150 DropPendingCollectionReaper::rollBackDropPendingCollection() rolls back at most one drop-pending collection.
Since it is now possible for multiple drop-pending collections (in different databases) to be linked
to the same drop optime, this function requires the fully qualified original collection optime to be
able to locate the correct entry in the drop pending collection multimap.
Diffstat (limited to 'src/mongo/db/repl/drop_pending_collection_reaper.h')
-rw-r--r-- | src/mongo/db/repl/drop_pending_collection_reaper.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/repl/drop_pending_collection_reaper.h b/src/mongo/db/repl/drop_pending_collection_reaper.h index 9ff494a0e57..40a31bf52af 100644 --- a/src/mongo/db/repl/drop_pending_collection_reaper.h +++ b/src/mongo/db/repl/drop_pending_collection_reaper.h @@ -100,16 +100,16 @@ public: /** * Renames the drop-pending namespace at the specified optime back to the provided name. - * There can only be one matching collection because optimes uniquely identify oplog entries. + * There can only be one matching collection per database and at most two entries per optime + * (due to renameCollection across databases). * We cannot reconstruct the original namespace so we must get it passed in. It accepts the - * collection name, not a fully qualified namespace. The database name is taken from the - * existing collection. + * fully qualified namespace so that we can locate the correct entry by optime and database. * This function also removes the entry from '_dropPendingNamespaces'. * This function returns false if there is no drop-pending collection at the specified optime. */ bool rollBackDropPendingCollection(OperationContext* opCtx, const OpTime& opTime, - StringData collName); + const NamespaceString& collectionNamespace); private: // All member variables are labeled with one of the following codes indicating the |