SERVER-114905 Skip collection names with trailing dot in ValidateCollections (#44845)

GitOrigin-RevId: 8f400cb94ce13d8fe894f4264346cabce5414fc3
This commit is contained in:
Philip Stoev 2025-12-05 16:57:48 +02:00 committed by MongoDB Bot
parent 38d404a910
commit c06d9172e8
1 changed files with 5 additions and 0 deletions

View File

@ -1226,6 +1226,11 @@ class ReplicaSetFixture(interface.ReplFixture, interface._DockerComposeInterface
continue
if coll_name in excluded_any_db_collections:
continue
# TODO SERVER-114904 Skip collections with names that end with a dot.
# Even though the server allows their creation, db.get_collection() below
# throws an InvalidName error.
if coll_name.endswith("."):
continue
# Skip collections that contain TTL indexes or TTL options.
indexes = db.get_collection(coll_name).list_indexes()
if any("expireAfterSeconds" in index for index in indexes):