SERVER-102519 Remove old shard catalog authoritative collection references (#49463)
GitOrigin-RevId: e356c1a6bf926ae0ad93c979ac5b227fe247189f
This commit is contained in:
parent
a5eadf495e
commit
3f80e17f4c
@ -27,7 +27,6 @@ describe("add shard with refurbished replicaset", function () {
|
||||
|
||||
this.dropMetadata = (rs) => {
|
||||
const config = rs.getPrimary().getDB("config");
|
||||
assert(config.getCollection("shard.collections").drop());
|
||||
assert(config.getCollection("shard.catalog.databases").drop());
|
||||
assert(config.getCollection("shard.catalog.collections").drop());
|
||||
assert(config.getCollection("shard.catalog.chunks").drop());
|
||||
|
||||
@ -76,7 +76,6 @@ const StringDataSet kConfigCollections{
|
||||
NamespaceString::kSessionTransactionsTableNamespace.coll(),
|
||||
NamespaceString::kSessionTransactionsTableNamespace.coll(),
|
||||
NamespaceString::kSetChangeStreamStateCoordinatorNamespace.coll(),
|
||||
NamespaceString::kShardCollectionCatalogNamespace.coll(),
|
||||
NamespaceString::kShardConfigCollectionsNamespace.coll(),
|
||||
NamespaceString::kConfigCacheDatabasesNamespace.coll(),
|
||||
NamespaceString::kShardingDDLCoordinatorsNamespace.coll(),
|
||||
|
||||
@ -208,9 +208,6 @@
|
||||
/* Namespace used for storing the list of sharded collections on the CSRS. */ \
|
||||
X(kConfigsvrCollectionsNamespace, DatabaseName::kConfig, "collections"_sd) \
|
||||
\
|
||||
/* Namespace used for storing the collection catalog on the shards. */ \
|
||||
X(kShardCollectionCatalogNamespace, DatabaseName::kConfig, "shard.collections"_sd) \
|
||||
\
|
||||
/* Namespace used for storing NamespacePlacementType docs on the CSRS. */ \
|
||||
X(kConfigsvrPlacementHistoryNamespace, DatabaseName::kConfig, "placementHistory"_sd) \
|
||||
\
|
||||
|
||||
@ -457,7 +457,6 @@ mongo_cc_library(
|
||||
"//src/mongo/db/shard_role/shard_catalog:database_sharding_runtime.cpp",
|
||||
"//src/mongo/db/shard_role/shard_catalog:database_sharding_state_factory_shard.cpp",
|
||||
"//src/mongo/db/shard_role/shard_catalog:metadata_manager.cpp",
|
||||
"//src/mongo/db/shard_role/shard_catalog:shard_authoritative_catalog_gen",
|
||||
"//src/mongo/db/shard_role/shard_catalog:shard_filtering_metadata_refresh.cpp",
|
||||
"//src/mongo/db/shard_role/shard_catalog:stale_shard_exception_handler.cpp",
|
||||
"//src/mongo/db/shard_role/shard_catalog:type_oplog_catalog_metadata_gen",
|
||||
|
||||
@ -601,14 +601,6 @@ mongo_cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
idl_generator(
|
||||
name = "shard_authoritative_catalog_gen",
|
||||
src = "shard_authoritative_catalog.idl",
|
||||
deps = [
|
||||
"//src/mongo/db:basic_types_gen",
|
||||
],
|
||||
)
|
||||
|
||||
idl_generator(
|
||||
name = "type_oplog_catalog_metadata_gen",
|
||||
src = "type_oplog_catalog_metadata.idl",
|
||||
|
||||
@ -1234,8 +1234,6 @@ class CollectionShardingRuntimeWithCatalogTest
|
||||
public:
|
||||
void setUp() override {
|
||||
CollectionShardingRuntimeWithRangeDeleterTest::setUp();
|
||||
DBDirectClient client(operationContext());
|
||||
client.createCollection(NamespaceString::kShardCollectionCatalogNamespace);
|
||||
}
|
||||
|
||||
void tearDown() override {
|
||||
|
||||
@ -1,65 +0,0 @@
|
||||
# Copyright (C) 2023-present MongoDB, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the Server Side Public License, version 1,
|
||||
# as published by MongoDB, Inc.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# Server Side Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the Server Side Public License
|
||||
# along with this program. If not, see
|
||||
# <http://www.mongodb.com/licensing/server-side-public-license>.
|
||||
#
|
||||
# As a special exception, the copyright holders give permission to link the
|
||||
# code of portions of this program with the OpenSSL library under certain
|
||||
# conditions as described in each individual source file and distribute
|
||||
# linked combinations including the program with the OpenSSL library. You
|
||||
# must comply with the Server Side Public License in all respects for
|
||||
# all of the code used other than as permitted herein. If you modify file(s)
|
||||
# with this exception, you may extend this exception to your version of the
|
||||
# file(s), but you are not obligated to do so. If you do not wish to do so,
|
||||
# delete this exception statement from your version. If you delete this
|
||||
# exception statement from all source files in the program, then also delete
|
||||
# it in the license file.
|
||||
#
|
||||
|
||||
# This file contains all the types that are authoritatively written in the shard server's
|
||||
# config.shard.xxx collections.
|
||||
|
||||
global:
|
||||
mod_visibility: private
|
||||
cpp_namespace: "mongo"
|
||||
|
||||
imports:
|
||||
- "mongo/db/basic_types.idl"
|
||||
|
||||
structs:
|
||||
ShardAuthoritativeCollectionType:
|
||||
description:
|
||||
"Represents the layout and contents of documents contained in the shard
|
||||
server's config.shard.collections collection. This type must be
|
||||
authoritatively written in shards. All manipulation of documents coming
|
||||
from that collection should be done with this class."
|
||||
strict: false
|
||||
fields:
|
||||
_id:
|
||||
cpp_name: nss
|
||||
type: namespacestring
|
||||
description: "The full namespace (with the database prefix)."
|
||||
optional: false
|
||||
uuid:
|
||||
cpp_name: uuid
|
||||
type: uuid
|
||||
description:
|
||||
"The UUID that will be used to create the local collection on each of
|
||||
the shards which have chunks."
|
||||
optional: false
|
||||
indexVersion:
|
||||
type: timestamp
|
||||
description:
|
||||
"Current collection index version. It will tick everytime a global
|
||||
index is created or dropped."
|
||||
optional: true
|
||||
@ -636,8 +636,7 @@ bool AddShardCoordinator::_hasShardingDataOnReplicaSet(OperationContext* opCtx)
|
||||
}
|
||||
|
||||
for (const auto& nss :
|
||||
std::vector<NamespaceString>{NamespaceString::kShardCollectionCatalogNamespace,
|
||||
NamespaceString::kConfigShardCatalogDatabasesNamespace,
|
||||
std::vector<NamespaceString>{NamespaceString::kConfigShardCatalogDatabasesNamespace,
|
||||
NamespaceString::kConfigShardCatalogCollectionsNamespace,
|
||||
NamespaceString::kConfigShardCatalogChunksNamespace,
|
||||
NamespaceString::kVectorClockNamespace,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user