From 0ebe07c83d7855ffb89e1689d20a86b287a4723d Mon Sep 17 00:00:00 2001 From: mitmitmitm Date: Tue, 20 Dec 2022 13:07:40 +0100 Subject: [PATCH] [mongo] Use "ping" command instead of "serverStatus" "serverStatus" on the "admin" database may fail due to insufficient privileges. --- lib/dbi/ogs-mongoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dbi/ogs-mongoc.c b/lib/dbi/ogs-mongoc.c index a9e6c21e8..ae8fcd15e 100644 --- a/lib/dbi/ogs-mongoc.c +++ b/lib/dbi/ogs-mongoc.c @@ -40,7 +40,7 @@ ogs_mongoc_mongoc_client_get_server_status (mongoc_client_t *client, /* IN */ BSON_ASSERT (client); - BSON_APPEND_INT32 (&cmd, "serverStatus", 1); + BSON_APPEND_INT32 (&cmd, "ping", 1); ret = mongoc_client_command_simple ( client, "admin", &cmd, read_prefs, reply, error); bson_destroy (&cmd);