Avoid mongodb compatibility regression by using 'ping' instead of 'hello' command
A follow-up to
See
@@ -199,9 +199,9 @@ def _db_connect(
# successfully established.
# See http://api.mongodb.com/python/current/api/pymongo/mongo_client.html for details
try:
- # The hello command is cheap and does not require auth
- # https://docs.mongodb.com/v4.4/reference/command/hello/
- connection.admin.command("hello")
+ # The ping command is cheap and does not require auth
+ # https://www.mongodb.com/community/forums/t/how-to-use-the-new-hello-interface-for-availability/116748/
+ connection.admin.command("ping")
except (ConnectionFailure, ServerSelectionTimeoutError) as e:
# NOTE: ServerSelectionTimeoutError can also be thrown if SSLHandShake fails in the server
# Sadly the client doesn't include more information about the error so in such scenarios
