From d02ac9d3a9b8ffa0b12fb59432b9a22e8266218a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 14 Aug 2025 13:17:26 -0500 Subject: [PATCH 1/3] PYTHON-5493 Add a patch for the log order difference --- .evergreen/spec-patch/PYTHON-5493.patch | 53 +++++++++++++++++++ .../connection-logging.json | 22 ++++---- 2 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 .evergreen/spec-patch/PYTHON-5493.patch diff --git a/.evergreen/spec-patch/PYTHON-5493.patch b/.evergreen/spec-patch/PYTHON-5493.patch new file mode 100644 index 0000000000..dc8c2a5ec3 --- /dev/null +++ b/.evergreen/spec-patch/PYTHON-5493.patch @@ -0,0 +1,53 @@ +diff --git a/test/connection_logging/connection-logging.json b/test/connection_logging/connection-logging.json +index 72103b3ca..d40cfbb7e 100644 +--- a/test/connection_logging/connection-logging.json ++++ b/test/connection_logging/connection-logging.json +@@ -272,13 +272,7 @@ + "level": "debug", + "component": "connection", + "data": { +- "message": "Connection closed", +- "driverConnectionId": { +- "$$type": [ +- "int", +- "long" +- ] +- }, ++ "message": "Connection pool closed", + "serverHost": { + "$$type": "string" + }, +@@ -287,15 +281,20 @@ + "int", + "long" + ] +- }, +- "reason": "Connection pool was closed" ++ } + } + }, + { + "level": "debug", + "component": "connection", + "data": { +- "message": "Connection pool closed", ++ "message": "Connection closed", ++ "driverConnectionId": { ++ "$$type": [ ++ "int", ++ "long" ++ ] ++ }, + "serverHost": { + "$$type": "string" + }, +@@ -304,7 +303,8 @@ + "int", + "long" + ] +- } ++ }, ++ "reason": "Connection pool was closed" + } + } + ] diff --git a/test/connection_logging/connection-logging.json b/test/connection_logging/connection-logging.json index 72103b3cab..d40cfbb7e2 100644 --- a/test/connection_logging/connection-logging.json +++ b/test/connection_logging/connection-logging.json @@ -272,13 +272,7 @@ "level": "debug", "component": "connection", "data": { - "message": "Connection closed", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, + "message": "Connection pool closed", "serverHost": { "$$type": "string" }, @@ -287,15 +281,20 @@ "int", "long" ] - }, - "reason": "Connection pool was closed" + } } }, { "level": "debug", "component": "connection", "data": { - "message": "Connection pool closed", + "message": "Connection closed", + "driverConnectionId": { + "$$type": [ + "int", + "long" + ] + }, "serverHost": { "$$type": "string" }, @@ -304,7 +303,8 @@ "int", "long" ] - } + }, + "reason": "Connection pool was closed" } } ] From ff704b8e77406f4113feb56c9d7c88b61035d373 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 14 Aug 2025 13:18:57 -0500 Subject: [PATCH 2/3] update the patch --- .evergreen/spec-patch/PYTHON-5493.patch | 61 ++++++++++--------- .../connection-logging.json | 46 +++++++------- 2 files changed, 55 insertions(+), 52 deletions(-) diff --git a/.evergreen/spec-patch/PYTHON-5493.patch b/.evergreen/spec-patch/PYTHON-5493.patch index dc8c2a5ec3..0967f1b1cc 100644 --- a/.evergreen/spec-patch/PYTHON-5493.patch +++ b/.evergreen/spec-patch/PYTHON-5493.patch @@ -1,53 +1,56 @@ diff --git a/test/connection_logging/connection-logging.json b/test/connection_logging/connection-logging.json -index 72103b3ca..d40cfbb7e 100644 +index 72103b3ca..43ae51d73 100644 --- a/test/connection_logging/connection-logging.json +++ b/test/connection_logging/connection-logging.json -@@ -272,13 +272,7 @@ +@@ -450,7 +450,13 @@ "level": "debug", "component": "connection", "data": { -- "message": "Connection closed", -- "driverConnectionId": { -- "$$type": [ -- "int", -- "long" -- ] -- }, -+ "message": "Connection pool closed", +- "message": "Connection pool cleared", ++ "message": "Connection closed", ++ "driverConnectionId": { ++ "$$type": [ ++ "int", ++ "long" ++ ] ++ }, "serverHost": { "$$type": "string" }, -@@ -287,15 +281,20 @@ +@@ -459,6 +465,10 @@ "int", "long" ] -- }, -- "reason": "Connection pool was closed" -+ } ++ }, ++ "reason": "An error occurred while using the connection", ++ "error": { ++ "$$exists": true + } } }, - { +@@ -466,13 +476,7 @@ "level": "debug", "component": "connection", "data": { -- "message": "Connection pool closed", -+ "message": "Connection closed", -+ "driverConnectionId": { -+ "$$type": [ -+ "int", -+ "long" -+ ] -+ }, +- "message": "Connection closed", +- "driverConnectionId": { +- "$$type": [ +- "int", +- "long" +- ] +- }, ++ "message": "Connection pool cleared", "serverHost": { "$$type": "string" }, -@@ -304,7 +303,8 @@ +@@ -481,10 +485,6 @@ "int", "long" ] -- } -+ }, -+ "reason": "Connection pool was closed" +- }, +- "reason": "An error occurred while using the connection", +- "error": { +- "$$exists": true + } } - } - ] + }, diff --git a/test/connection_logging/connection-logging.json b/test/connection_logging/connection-logging.json index d40cfbb7e2..43ae51d738 100644 --- a/test/connection_logging/connection-logging.json +++ b/test/connection_logging/connection-logging.json @@ -272,7 +272,13 @@ "level": "debug", "component": "connection", "data": { - "message": "Connection pool closed", + "message": "Connection closed", + "driverConnectionId": { + "$$type": [ + "int", + "long" + ] + }, "serverHost": { "$$type": "string" }, @@ -281,20 +287,15 @@ "int", "long" ] - } + }, + "reason": "Connection pool was closed" } }, { "level": "debug", "component": "connection", "data": { - "message": "Connection closed", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, + "message": "Connection pool closed", "serverHost": { "$$type": "string" }, @@ -303,8 +304,7 @@ "int", "long" ] - }, - "reason": "Connection pool was closed" + } } } ] @@ -450,7 +450,13 @@ "level": "debug", "component": "connection", "data": { - "message": "Connection pool cleared", + "message": "Connection closed", + "driverConnectionId": { + "$$type": [ + "int", + "long" + ] + }, "serverHost": { "$$type": "string" }, @@ -459,6 +465,10 @@ "int", "long" ] + }, + "reason": "An error occurred while using the connection", + "error": { + "$$exists": true } } }, @@ -466,13 +476,7 @@ "level": "debug", "component": "connection", "data": { - "message": "Connection closed", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, + "message": "Connection pool cleared", "serverHost": { "$$type": "string" }, @@ -481,10 +485,6 @@ "int", "long" ] - }, - "reason": "An error occurred while using the connection", - "error": { - "$$exists": true } } }, From ac5b6432c485957e47a73d0e4fd4b8f8d9da7519 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 14 Aug 2025 13:19:48 -0500 Subject: [PATCH 3/3] update the patch --- .evergreen/spec-patch/PYTHON-5493.patch | 71 +++++++++++++++---- .../connection-logging.json | 26 +++---- 2 files changed, 70 insertions(+), 27 deletions(-) diff --git a/.evergreen/spec-patch/PYTHON-5493.patch b/.evergreen/spec-patch/PYTHON-5493.patch index 0967f1b1cc..cf1afbb271 100644 --- a/.evergreen/spec-patch/PYTHON-5493.patch +++ b/.evergreen/spec-patch/PYTHON-5493.patch @@ -1,12 +1,12 @@ diff --git a/test/connection_logging/connection-logging.json b/test/connection_logging/connection-logging.json -index 72103b3ca..43ae51d73 100644 +index d40cfbb7e..5799e834d 100644 --- a/test/connection_logging/connection-logging.json +++ b/test/connection_logging/connection-logging.json -@@ -450,7 +450,13 @@ +@@ -272,7 +272,13 @@ "level": "debug", "component": "connection", "data": { -- "message": "Connection pool cleared", +- "message": "Connection pool closed", + "message": "Connection closed", + "driverConnectionId": { + "$$type": [ @@ -17,18 +17,16 @@ index 72103b3ca..43ae51d73 100644 "serverHost": { "$$type": "string" }, -@@ -459,6 +465,10 @@ +@@ -281,20 +287,15 @@ "int", "long" ] +- } + }, -+ "reason": "An error occurred while using the connection", -+ "error": { -+ "$$exists": true - } ++ "reason": "Connection pool was closed" } }, -@@ -466,13 +476,7 @@ + { "level": "debug", "component": "connection", "data": { @@ -39,18 +37,63 @@ index 72103b3ca..43ae51d73 100644 - "long" - ] - }, -+ "message": "Connection pool cleared", ++ "message": "Connection pool closed", "serverHost": { "$$type": "string" }, -@@ -481,10 +485,6 @@ +@@ -303,8 +304,7 @@ "int", "long" ] - }, -- "reason": "An error occurred while using the connection", -- "error": { -- "$$exists": true +- "reason": "Connection pool was closed" ++ } + } + } + ] +@@ -446,22 +446,6 @@ } } }, +- { +- "level": "debug", +- "component": "connection", +- "data": { +- "message": "Connection pool cleared", +- "serverHost": { +- "$$type": "string" +- }, +- "serverPort": { +- "$$type": [ +- "int", +- "long" +- ] +- } +- } +- }, + { + "level": "debug", + "component": "connection", +@@ -514,6 +498,22 @@ + ] + } + } ++ }, ++ { ++ "level": "debug", ++ "component": "connection", ++ "data": { ++ "message": "Connection pool cleared", ++ "serverHost": { ++ "$$type": "string" ++ }, ++ "serverPort": { ++ "$$type": [ ++ "int", ++ "long" ++ ] ++ } ++ } + } + ] + } diff --git a/test/connection_logging/connection-logging.json b/test/connection_logging/connection-logging.json index 43ae51d738..5799e834d7 100644 --- a/test/connection_logging/connection-logging.json +++ b/test/connection_logging/connection-logging.json @@ -476,7 +476,7 @@ "level": "debug", "component": "connection", "data": { - "message": "Connection pool cleared", + "message": "Connection checkout failed", "serverHost": { "$$type": "string" }, @@ -485,6 +485,17 @@ "int", "long" ] + }, + "reason": "An error occurred while trying to establish a new connection", + "error": { + "$$exists": true + }, + "durationMS": { + "$$type": [ + "double", + "int", + "long" + ] } } }, @@ -492,7 +503,7 @@ "level": "debug", "component": "connection", "data": { - "message": "Connection checkout failed", + "message": "Connection pool cleared", "serverHost": { "$$type": "string" }, @@ -501,17 +512,6 @@ "int", "long" ] - }, - "reason": "An error occurred while trying to establish a new connection", - "error": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] } } }