diff options
author | David Storch <david.storch@10gen.com> | 2018-10-04 18:27:48 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2018-10-23 17:18:11 -0400 |
commit | 2cdc2a96e1c8779658fe0eab459dcc38cf01c54d (patch) | |
tree | 875f55acaaba283f02895938ee4b6c764eac349a /src/mongo/db/s | |
parent | e7bed9bdcb376d5a06dce6228047309e8481f9cf (diff) | |
download | mongo-2cdc2a96e1c8779658fe0eab459dcc38cf01c54d.tar.gz |
SERVER-37443 Make catalog objects survive collection rename.
This change only applies to collection renames within the
same database. Rename across databases requires copying the
data, and the resulting collection will have a new UUID.
Diffstat (limited to 'src/mongo/db/s')
-rw-r--r-- | src/mongo/db/s/config_server_op_observer.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/s/config_server_op_observer.h | 3 | ||||
-rw-r--r-- | src/mongo/db/s/shard_server_op_observer.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/s/shard_server_op_observer.h | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/s/config_server_op_observer.cpp b/src/mongo/db/s/config_server_op_observer.cpp index eefbe2e3991..cdf45de44f5 100644 --- a/src/mongo/db/s/config_server_op_observer.cpp +++ b/src/mongo/db/s/config_server_op_observer.cpp @@ -65,7 +65,8 @@ void ConfigServerOpObserver::onDelete(OperationContext* opCtx, repl::OpTime ConfigServerOpObserver::onDropCollection(OperationContext* opCtx, const NamespaceString& collectionName, - OptionalCollectionUUID uuid) { + OptionalCollectionUUID uuid, + const CollectionDropType dropType) { if (collectionName == VersionType::ConfigNS) { if (!repl::ReplicationCoordinator::get(opCtx)->getMemberState().rollback()) { uasserted(40303, "cannot drop config.version document while in --configsvr mode"); diff --git a/src/mongo/db/s/config_server_op_observer.h b/src/mongo/db/s/config_server_op_observer.h index 0f0e11ba04f..458d9627955 100644 --- a/src/mongo/db/s/config_server_op_observer.h +++ b/src/mongo/db/s/config_server_op_observer.h @@ -96,7 +96,8 @@ public: repl::OpTime onDropCollection(OperationContext* opCtx, const NamespaceString& collectionName, - OptionalCollectionUUID uuid) override; + OptionalCollectionUUID uuid, + CollectionDropType dropType) override; void onDropIndex(OperationContext* opCtx, const NamespaceString& nss, diff --git a/src/mongo/db/s/shard_server_op_observer.cpp b/src/mongo/db/s/shard_server_op_observer.cpp index dd50e93ab58..4330da209bc 100644 --- a/src/mongo/db/s/shard_server_op_observer.cpp +++ b/src/mongo/db/s/shard_server_op_observer.cpp @@ -391,7 +391,8 @@ void ShardServerOpObserver::onDelete(OperationContext* opCtx, repl::OpTime ShardServerOpObserver::onDropCollection(OperationContext* opCtx, const NamespaceString& collectionName, - OptionalCollectionUUID uuid) { + OptionalCollectionUUID uuid, + const CollectionDropType dropType) { if (collectionName == NamespaceString::kServerConfigurationNamespace) { // Dropping system collections is not allowed for end users invariant(!opCtx->writesAreReplicated()); diff --git a/src/mongo/db/s/shard_server_op_observer.h b/src/mongo/db/s/shard_server_op_observer.h index 88a9677389f..61e0f0dfca0 100644 --- a/src/mongo/db/s/shard_server_op_observer.h +++ b/src/mongo/db/s/shard_server_op_observer.h @@ -97,7 +97,8 @@ public: repl::OpTime onDropCollection(OperationContext* opCtx, const NamespaceString& collectionName, - OptionalCollectionUUID uuid) override; + OptionalCollectionUUID uuid, + CollectionDropType dropType) override; void onDropIndex(OperationContext* opCtx, const NamespaceString& nss, |