Hi,
Using MongoDB documentation I cannot find the minimum wire version for listCollections command.
Looking at PyMongo code it appears that listCollections command is only sent if max wire version is higher than 2.
def _list_collections(self, sock_info, slave_okay, session=None, **kwargs):
"""Internal listCollections helper."""
coll = self["$cmd"]
if sock_info.max_wire_version > 2:
cmd = SON([("listCollections", 1),
("cursor", {})])
I would like to know the reason for this restriction.
When I tried the command against Microsoft Azure Cosmos DB (Mongo), having a max wire version set to 2, it returns the collection names so I am not sure what the issue is.
It can also be an error on Microsoft implementation of the MongoDB API (would not be the first time) but I'd rather be sure before entering any issue.
Thanks again,