From cebb45c38a7510de4c02870e343c288b4d1990e3 Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Tue, 27 Aug 2024 06:18:33 -0400 Subject: [PATCH] [mongo] Remove comment from obfuscate command and send comment as a separate field in payload (#18404) --- mongo/changelog.d/18404.fixed | 1 + .../mongo/dbm/operation_samples.py | 8 +- .../mongo/dbm/slow_operations.py | 13 +-- mongo/datadog_checks/mongo/dbm/utils.py | 18 ++++ mongo/tests/fixtures/$currentOp-mongos | 1 + mongo/tests/fixtures/$currentOp-standalone | 1 + .../results/operation-activities-mongos.json | 22 ++--- .../operation-activities-standalone.json | 13 +-- .../results/operation-samples-mongos.json | 6 +- .../results/operation-samples-standalone.json | 6 +- .../slow-operations-explain-plans-mongos.json | 22 ++--- ...w-operations-explain-plans-standalone.json | 15 ++-- .../tests/results/slow-operations-mongos.json | 86 +++++++++++-------- .../results/slow-operations-standalone.json | 63 ++++++++------ 14 files changed, 170 insertions(+), 105 deletions(-) create mode 100644 mongo/changelog.d/18404.fixed diff --git a/mongo/changelog.d/18404.fixed b/mongo/changelog.d/18404.fixed new file mode 100644 index 0000000000000..aa030c9370fcf --- /dev/null +++ b/mongo/changelog.d/18404.fixed @@ -0,0 +1 @@ +Remove `comment` from obfuscate command and send it as a separate field in operation samples and slow operations payload. diff --git a/mongo/datadog_checks/mongo/dbm/operation_samples.py b/mongo/datadog_checks/mongo/dbm/operation_samples.py index 875689b2f646e..acbe0bf75b210 100644 --- a/mongo/datadog_checks/mongo/dbm/operation_samples.py +++ b/mongo/datadog_checks/mongo/dbm/operation_samples.py @@ -14,6 +14,7 @@ get_command_collection, get_command_truncation_state, get_explain_plan, + obfuscate_command, should_explain_operation, ) @@ -115,7 +116,7 @@ def _get_operation_samples(self, now, databases_monitored: List[str]): continue command = operation.get("command") - obfuscated_command = datadog_agent.obfuscate_mongodb_string(json_util.dumps(command)) + obfuscated_command = obfuscate_command(command) query_signature = self._get_query_signature(obfuscated_command) operation_metadata = self._get_operation_metadata(operation) @@ -243,8 +244,10 @@ def _get_operation_cursor(self, operation: dict) -> Optional[OperationSampleOper last_access_date = last_access_date.isoformat() originating_command = cursor.get("originatingCommand") + originating_command_comment = None if originating_command: - originating_command = datadog_agent.obfuscate_mongodb_string(json_util.dumps(originating_command)) + originating_command_comment = originating_command.get("comment") + originating_command = obfuscate_command(originating_command) return { "cursor_id": cursor.get("cursorId"), @@ -256,6 +259,7 @@ def _get_operation_cursor(self, operation: dict) -> Optional[OperationSampleOper "tailable": cursor.get("tailable", False), "await_data": cursor.get("awaitData", False), "originating_command": originating_command, + "comment": originating_command_comment, "plan_summary": cursor.get("planSummary"), "operation_using_cursor_id": cursor.get("operationUsingCursorId"), } diff --git a/mongo/datadog_checks/mongo/dbm/slow_operations.py b/mongo/datadog_checks/mongo/dbm/slow_operations.py index 4b02993341fd8..93cbf6d4c5054 100644 --- a/mongo/datadog_checks/mongo/dbm/slow_operations.py +++ b/mongo/datadog_checks/mongo/dbm/slow_operations.py @@ -14,6 +14,7 @@ get_command_collection, get_command_truncation_state, get_explain_plan, + obfuscate_command, should_explain_operation, ) @@ -190,16 +191,16 @@ def _collect_slow_operation_explain_plan(self, slow_operation, dbname): self._check.log.error("Failed to collect explain plan for slow operation: %s", e) def _obfuscate_slow_operation(self, slow_operation, db_name): - obfuscated_command = datadog_agent.obfuscate_mongodb_string(json_util.dumps(slow_operation["command"])) + obfuscated_command = obfuscate_command(slow_operation["command"]) query_signature = compute_exec_plan_signature(obfuscated_command) slow_operation['dbname'] = db_name slow_operation['obfuscated_command'] = obfuscated_command slow_operation['query_signature'] = query_signature - if slow_operation.get('originatingCommand'): - slow_operation['originatingCommand'] = datadog_agent.obfuscate_mongodb_string( - json_util.dumps(slow_operation['originatingCommand']) - ) + originating_command = slow_operation.get('originatingCommand') + if originating_command: + slow_operation['originatingCommandComment'] = originating_command.get('comment') + slow_operation['originatingCommand'] = obfuscate_command(originating_command) return slow_operation @@ -242,6 +243,7 @@ def _create_slow_operation_event(self, slow_operation): "query_hash": slow_operation.get("queryHash"), # only available with profiling "plan_cache_key": slow_operation.get("planCacheKey"), # only available with profiling "query_framework": slow_operation.get("queryFramework"), + "comment": slow_operation["command"].get("comment"), # metrics # mills from profiler, durationMillis from logs "mills": slow_operation.get("millis", slow_operation.get("durationMillis", 0)), @@ -337,6 +339,7 @@ def _get_slow_operation_cursor(self, slow_operation): return { "cursor_id": cursor_id, "originating_command": originating_command, + "comment": slow_operation.get("originatingCommandComment"), } return None diff --git a/mongo/datadog_checks/mongo/dbm/utils.py b/mongo/datadog_checks/mongo/dbm/utils.py index b6968efb96581..3058e8670fd4c 100644 --- a/mongo/datadog_checks/mongo/dbm/utils.py +++ b/mongo/datadog_checks/mongo/dbm/utils.py @@ -11,6 +11,12 @@ from datadog_checks.base.utils.db.sql import compute_exec_plan_signature from datadog_checks.base.utils.db.utils import RateLimitingTTLCache +try: + import datadog_agent +except ImportError: + from datadog_checks.base.stubs import datadog_agent + + MONGODB_SYSTEM_DATABASES = frozenset(["admin", "config", "local"]) # exclude keys in sampled operation that cause issues with the explain command @@ -150,3 +156,15 @@ def get_command_collection(command: dict, ns: str) -> Optional[str]: if collection and isinstance(collection, str): # edge case like {"aggregate": 1} return collection return None + + +def obfuscate_command(command: dict): + # Obfuscate the command to remove sensitive information + # Remove the following keys from the command before obfuscating + # - comment: The comment field should not contribute to the query signature + # - lsid: The lsid field is a unique identifier for the session + # - $clusterTime: The $clusterTime field is a logical time used for ordering of operations + obfuscated_command = command.copy() + for key in ("comment", "lsid", "$clusterTime"): + obfuscated_command.pop(key, None) + return datadog_agent.obfuscate_mongodb_string(json_util.dumps(obfuscated_command)) diff --git a/mongo/tests/fixtures/$currentOp-mongos b/mongo/tests/fixtures/$currentOp-mongos index 66eecd6bfde09..299961375511c 100644 --- a/mongo/tests/fixtures/$currentOp-mongos +++ b/mongo/tests/fixtures/$currentOp-mongos @@ -398,6 +398,7 @@ } } ], + "comment": "get more movies", "cursor": { "batchSize": 0 }, diff --git a/mongo/tests/fixtures/$currentOp-standalone b/mongo/tests/fixtures/$currentOp-standalone index 90a1067fad51a..b510499ffc76e 100644 --- a/mongo/tests/fixtures/$currentOp-standalone +++ b/mongo/tests/fixtures/$currentOp-standalone @@ -304,6 +304,7 @@ } } }, + "comment": "oplogReplay", "batchSize": 13981010, "tailable": true, "awaitData": true, diff --git a/mongo/tests/results/operation-activities-mongos.json b/mongo/tests/results/operation-activities-mongos.json index 901c05642b428..5ca7e741a17de 100644 --- a/mongo/tests/results/operation-activities-mongos.json +++ b/mongo/tests/results/operation-activities-mongos.json @@ -15,8 +15,8 @@ "mongodb_activity": [ { "now": 1715911398.1112723, - "query_signature": "6324f030638a5dc0", - "statement": "{\"find\": \"users\", \"projection\": {\"$sortKey\": {\"$meta\": \"sortKey\"}}, \"sort\": {\"user_id\": 1}, \"needsMerge\": true, \"let\": {\"CLUSTER_TIME\": {\"$literal\": {\"t\": 1716215816, \"i\": 1}}, \"NOW\": {\"$literal\": \"2024-05-20T14:36:56.231+00:00\"}}, \"fromMongos\": true, \"singleBatch\": false, \"writeConcern\": {\"w\": \"majority\", \"wtimeout\": 0, \"provenance\": \"implicitDefault\"}, \"readConcern\": {\"level\": \"local\", \"provenance\": \"implicitDefault\"}, \"shardVersion\": {\"t\": {\"$timestamp\": {\"t\": 1716215708, \"i\": 12}}, \"e\": {\"$oid\": \"664b5f9d05fee29701ab2bfb\"}, \"v\": {\"$timestamp\": {\"t\": 1, \"i\": 7}}}, \"clientOperationKey\": {\"$binary\": {\"base64\": \"cZAjiXzbSZianZ+RrPdTaA==\", \"subType\": \"04\"}}, \"comment\": \"sort\", \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"/5W615FQTDardJroxkDVTg==\", \"subType\": \"04\"}}, \"uid\": {\"$binary\": {\"base64\": \"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\", \"subType\": \"00\"}}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1716215816, \"i\": 1}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\", \"subType\": \"00\"}}, \"keyId\": 0}}, \"$configTime\": {\"$timestamp\": {\"t\": 1716215814, \"i\": 1}}, \"$topologyTime\": {\"$timestamp\": {\"t\": 1716215696, \"i\": 24}}, \"$audit\": {\"$impersonatedUsers\": [{\"user\": \"test\", \"db\": \"admin\"}], \"$impersonatedRoles\": [{\"role\": \"root\", \"db\": \"admin\"}]}, \"$client\": {\"driver\": {\"name\": \"PyMongo\", \"version\": \"4.7.2\"}, \"os\": {\"type\": \"Darwin\", \"name\": \"Darwin\", \"architecture\": \"arm64\", \"version\": \"14.4.1\"}, \"platform\": \"CPython 3.9.16.final.0\", \"mongos\": {\"host\": \"7203110cbd0b:27017\", \"client\": \"192.168.65.1:39545\", \"version\": \"6.0.15\"}}, \"mayBypassWriteBlocking\": true, \"$db\": \"integration\"}", + "query_signature": "50114961ffa245f7", + "statement": "{\"find\": \"users\", \"projection\": {\"$sortKey\": {\"$meta\": \"sortKey\"}}, \"sort\": {\"user_id\": 1}, \"needsMerge\": true, \"let\": {\"CLUSTER_TIME\": {\"$literal\": {\"t\": 1716215816, \"i\": 1}}, \"NOW\": {\"$literal\": \"2024-05-20T14:36:56.231+00:00\"}}, \"fromMongos\": true, \"singleBatch\": false, \"writeConcern\": {\"w\": \"majority\", \"wtimeout\": 0, \"provenance\": \"implicitDefault\"}, \"readConcern\": {\"level\": \"local\", \"provenance\": \"implicitDefault\"}, \"shardVersion\": {\"t\": {\"$timestamp\": {\"t\": 1716215708, \"i\": 12}}, \"e\": {\"$oid\": \"664b5f9d05fee29701ab2bfb\"}, \"v\": {\"$timestamp\": {\"t\": 1, \"i\": 7}}}, \"clientOperationKey\": {\"$binary\": {\"base64\": \"cZAjiXzbSZianZ+RrPdTaA==\", \"subType\": \"04\"}}, \"$configTime\": {\"$timestamp\": {\"t\": 1716215814, \"i\": 1}}, \"$topologyTime\": {\"$timestamp\": {\"t\": 1716215696, \"i\": 24}}, \"$audit\": {\"$impersonatedUsers\": [{\"user\": \"test\", \"db\": \"admin\"}], \"$impersonatedRoles\": [{\"role\": \"root\", \"db\": \"admin\"}]}, \"$client\": {\"driver\": {\"name\": \"PyMongo\", \"version\": \"4.7.2\"}, \"os\": {\"type\": \"Darwin\", \"name\": \"Darwin\", \"architecture\": \"arm64\", \"version\": \"14.4.1\"}, \"platform\": \"CPython 3.9.16.final.0\", \"mongos\": {\"host\": \"7203110cbd0b:27017\", \"client\": \"192.168.65.1:39545\", \"version\": \"6.0.15\"}}, \"mayBypassWriteBlocking\": true, \"$db\": \"integration\"}", "active": true, "desc": "conn143", "opid": "shard04:265665", @@ -84,8 +84,8 @@ }, { "now": 1715911398.1112723, - "query_signature": "c9f4db9be9cc6b96", - "statement": "{\"getMore\": 7153547462305880513, \"collection\": \"movies\", \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"zLd+DNpkQdqkWN1AZ828SA==\", \"subType\": \"04\"}}, \"uid\": {\"$binary\": {\"base64\": \"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\", \"subType\": \"00\"}}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1718311810, \"i\": 6}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\", \"subType\": \"00\"}}, \"keyId\": 0}}, \"$configTime\": {\"$timestamp\": {\"t\": 1718311809, \"i\": 1}}, \"$topologyTime\": {\"$timestamp\": {\"t\": 1716428552, \"i\": 3}}, \"$audit\": {\"$impersonatedUser\": {\"user\": \"shopper_4\", \"db\": \"admin\"}, \"$impersonatedRoles\": [{\"role\": \"readWrite\", \"db\": \"dbmorders\"}, {\"role\": \"readWrite\", \"db\": \"integration\"}]}, \"$client\": {\"application\": {\"name\": \"orders-mongo\"}, \"driver\": {\"name\": \"mongo-go-driver\", \"version\": \"v1.15.0\"}, \"os\": {\"type\": \"linux\", \"architecture\": \"amd64\"}, \"platform\": \"go1.22.1\", \"env\": {\"container\": {\"runtime\": \"docker\"}}, \"mongos\": {\"host\": \"ip-172-29-203-167:27017\", \"client\": \"127.0.0.1:50388\", \"version\": \"7.0.9\"}}, \"mayBypassWriteBlocking\": true, \"$db\": \"integration\"}", + "query_signature": "dff032249380b09d", + "statement": "{\"getMore\": 7153547462305880513, \"collection\": \"movies\", \"$configTime\": {\"$timestamp\": {\"t\": 1718311809, \"i\": 1}}, \"$topologyTime\": {\"$timestamp\": {\"t\": 1716428552, \"i\": 3}}, \"$audit\": {\"$impersonatedUser\": {\"user\": \"shopper_4\", \"db\": \"admin\"}, \"$impersonatedRoles\": [{\"role\": \"readWrite\", \"db\": \"dbmorders\"}, {\"role\": \"readWrite\", \"db\": \"integration\"}]}, \"$client\": {\"application\": {\"name\": \"orders-mongo\"}, \"driver\": {\"name\": \"mongo-go-driver\", \"version\": \"v1.15.0\"}, \"os\": {\"type\": \"linux\", \"architecture\": \"amd64\"}, \"platform\": \"go1.22.1\", \"env\": {\"container\": {\"runtime\": \"docker\"}}, \"mongos\": {\"host\": \"ip-172-29-203-167:27017\", \"client\": \"127.0.0.1:50388\", \"version\": \"7.0.9\"}}, \"mayBypassWriteBlocking\": true, \"$db\": \"integration\"}", "active": true, "desc": "conn703087", "opid": "shard2:155914227", @@ -132,9 +132,10 @@ "no_cursor_timeout": false, "tailable": false, "await_data": false, - "originating_command": "{\"aggregate\": \"movies\", \"pipeline\": [{\"$lookup\": {\"from\": \"comments\", \"as\": \"comments\", \"localField\": \"_id\", \"foreignField\": \"movie_id\"}}], \"cursor\": {\"batchSize\": 0}, \"needsMerge\": true, \"let\": {\"NOW\": {\"$literal\": {\"$date\": \"2024-06-13T20:50:10.805Z\"}}, \"CLUSTER_TIME\": {\"$literal\": {\"$timestamp\": {\"t\": 1718311810, \"i\": 6}}}}, \"fromMongos\": true, \"collation\": {\"locale\": \"simple\"}, \"readConcern\": {\"level\": \"local\", \"provenance\": \"implicitDefault\"}, \"writeConcern\": {\"w\": \"majority\", \"wtimeout\": 0, \"provenance\": \"implicitDefault\"}, \"shardVersion\": {\"e\": {\"$oid\": \"666b52b852fa5a96da6d59ae\"}, \"t\": {\"$timestamp\": {\"t\": 1718309560, \"i\": 188}}, \"v\": {\"$timestamp\": {\"t\": 1, \"i\": 5}}}, \"clientOperationKey\": {\"$binary\": {\"base64\": \"zc+70kUAQ5m1zVRdJjwYxw==\", \"subType\": \"04\"}}, \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"zLd+DNpkQdqkWN1AZ828SA==\", \"subType\": \"04\"}}, \"uid\": {\"$binary\": {\"base64\": \"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\", \"subType\": \"00\"}}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1718311810, \"i\": 6}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\", \"subType\": \"00\"}}, \"keyId\": 0}}, \"$configTime\": {\"$timestamp\": {\"t\": 1718311809, \"i\": 1}}, \"$topologyTime\": {\"$timestamp\": {\"t\": 1716428552, \"i\": 3}}, \"$audit\": {\"$impersonatedUser\": {\"user\": \"shopper_4\", \"db\": \"admin\"}, \"$impersonatedRoles\": [{\"role\": \"readWrite\", \"db\": \"dbmorders\"}, {\"role\": \"readWrite\", \"db\": \"integration\"}]}, \"$client\": {\"application\": {\"name\": \"orders-mongo\"}, \"driver\": {\"name\": \"mongo-go-driver\", \"version\": \"v1.15.0\"}, \"os\": {\"type\": \"linux\", \"architecture\": \"amd64\"}, \"platform\": \"go1.22.1\", \"env\": {\"container\": {\"runtime\": \"docker\"}}, \"mongos\": {\"host\": \"ip-172-29-203-167:27017\", \"client\": \"127.0.0.1:50388\", \"version\": \"7.0.9\"}}, \"mayBypassWriteBlocking\": true, \"$db\": \"integration\"}", + "originating_command": "{\"aggregate\": \"movies\", \"pipeline\": [{\"$lookup\": {\"from\": \"comments\", \"as\": \"comments\", \"localField\": \"_id\", \"foreignField\": \"movie_id\"}}], \"cursor\": {\"batchSize\": 0}, \"needsMerge\": true, \"let\": {\"NOW\": {\"$literal\": {\"$date\": \"2024-06-13T20:50:10.805Z\"}}, \"CLUSTER_TIME\": {\"$literal\": {\"$timestamp\": {\"t\": 1718311810, \"i\": 6}}}}, \"fromMongos\": true, \"collation\": {\"locale\": \"simple\"}, \"readConcern\": {\"level\": \"local\", \"provenance\": \"implicitDefault\"}, \"writeConcern\": {\"w\": \"majority\", \"wtimeout\": 0, \"provenance\": \"implicitDefault\"}, \"shardVersion\": {\"e\": {\"$oid\": \"666b52b852fa5a96da6d59ae\"}, \"t\": {\"$timestamp\": {\"t\": 1718309560, \"i\": 188}}, \"v\": {\"$timestamp\": {\"t\": 1, \"i\": 5}}}, \"clientOperationKey\": {\"$binary\": {\"base64\": \"zc+70kUAQ5m1zVRdJjwYxw==\", \"subType\": \"04\"}}, \"$configTime\": {\"$timestamp\": {\"t\": 1718311809, \"i\": 1}}, \"$topologyTime\": {\"$timestamp\": {\"t\": 1716428552, \"i\": 3}}, \"$audit\": {\"$impersonatedUser\": {\"user\": \"shopper_4\", \"db\": \"admin\"}, \"$impersonatedRoles\": [{\"role\": \"readWrite\", \"db\": \"dbmorders\"}, {\"role\": \"readWrite\", \"db\": \"integration\"}]}, \"$client\": {\"application\": {\"name\": \"orders-mongo\"}, \"driver\": {\"name\": \"mongo-go-driver\", \"version\": \"v1.15.0\"}, \"os\": {\"type\": \"linux\", \"architecture\": \"amd64\"}, \"platform\": \"go1.22.1\", \"env\": {\"container\": {\"runtime\": \"docker\"}}, \"mongos\": {\"host\": \"ip-172-29-203-167:27017\", \"client\": \"127.0.0.1:50388\", \"version\": \"7.0.9\"}}, \"mayBypassWriteBlocking\": true, \"$db\": \"integration\"}", "plan_summary": "COLLSCAN", - "operation_using_cursor_id": 155914227 + "operation_using_cursor_id": 155914227, + "comment": "get more movies" }, "type": "op", "op": "getmore", @@ -160,8 +161,8 @@ }, { "now": 1715911398.1112723, - "query_signature": "8e567c5655c884d0", - "statement": "{\"getMore\": 7156629711810917986, \"collection\": \"oplog.rs\", \"batchSize\": 13981010, \"maxTimeMS\": 5000, \"term\": 2, \"lastKnownCommittedOpTime\": {\"ts\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 17}}, \"t\": 2}, \"$replData\": 1, \"$oplogQueryData\": 1, \"$readPreference\": {\"mode\": \"secondaryPreferred\"}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 18}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"fAxz3pScinFgqdNkVCRZGX3goGY=\", \"subType\": \"00\"}}, \"keyId\": 7387155612372566021}}, \"$db\": \"local\"}", + "query_signature": "2098271ac4fceefe", + "statement": "{\"getMore\": 7156629711810917986, \"collection\": \"oplog.rs\", \"batchSize\": 13981010, \"maxTimeMS\": 5000, \"term\": 2, \"lastKnownCommittedOpTime\": {\"ts\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 17}}, \"t\": 2}, \"$replData\": 1, \"$oplogQueryData\": 1, \"$readPreference\": {\"mode\": \"secondaryPreferred\"}, \"$db\": \"local\"}", "active": true, "desc": "conn1392", "opid": 1399253104, @@ -200,9 +201,10 @@ "no_cursor_timeout": false, "tailable": true, "await_data": true, - "originating_command": "{\"find\": \"oplog.rs\", \"filter\": {\"ts\": {\"$gte\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 17}}}}, \"batchSize\": 13981010, \"tailable\": true, \"awaitData\": true, \"term\": 2, \"maxTimeMS\": 60000, \"readConcern\": {\"level\": \"local\", \"afterClusterTime\": {\"$timestamp\": {\"t\": 0, \"i\": 1}}}, \"$replData\": 1, \"$oplogQueryData\": 1, \"$readPreference\": {\"mode\": \"secondaryPreferred\"}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 18}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"fAxz3pScinFgqdNkVCRZGX3goGY=\", \"subType\": \"00\"}}, \"keyId\": 7387155612372566021}}, \"$db\": \"local\"}", + "originating_command": "{\"find\": \"oplog.rs\", \"filter\": {\"ts\": {\"$gte\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 17}}}}, \"batchSize\": 13981010, \"tailable\": true, \"awaitData\": true, \"term\": 2, \"maxTimeMS\": 60000, \"readConcern\": {\"level\": \"local\", \"afterClusterTime\": {\"$timestamp\": {\"t\": 0, \"i\": 1}}}, \"$replData\": 1, \"$oplogQueryData\": 1, \"$readPreference\": {\"mode\": \"secondaryPreferred\"}, \"$db\": \"local\"}", "plan_summary": null, - "operation_using_cursor_id": 1399253104 + "operation_using_cursor_id": 1399253104, + "comment": null }, "type": "op", "op": "getmore", diff --git a/mongo/tests/results/operation-activities-standalone.json b/mongo/tests/results/operation-activities-standalone.json index f6600c5efd168..f2d3a7b3869d1 100644 --- a/mongo/tests/results/operation-activities-standalone.json +++ b/mongo/tests/results/operation-activities-standalone.json @@ -14,8 +14,8 @@ "mongodb_activity": [ { "now": 1715911398.1112723, - "query_signature": "4dbd60784e36b560", - "statement": "{\"find\": \"products\", \"filter\": {\"$and\": [{\"data\": {\"$gt\": 0.6283678507530881}}, {\"message\": {\"$regularExpression\": {\"pattern\": \"log\", \"options\": \"\"}}}]}, \"comment\": \"find\", \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"/n9kUpUhR1ymJjEwvCySbg==\", \"subType\": \"04\"}}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1715882797, \"i\": 5}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\", \"subType\": \"00\"}}, \"keyId\": 0}}, \"$db\": \"integration\", \"$readPreference\": {\"mode\": \"primaryPreferred\"}}", + "query_signature": "a5c9a4483fa9bcdf", + "statement": "{\"find\": \"products\", \"filter\": {\"$and\": [{\"data\": {\"$gt\": 0.6283678507530881}}, {\"message\": {\"$regularExpression\": {\"pattern\": \"log\", \"options\": \"\"}}}]}, \"$db\": \"integration\", \"$readPreference\": {\"mode\": \"primaryPreferred\"}}", "active": true, "desc": "conn104", "opid": 1538838, @@ -85,8 +85,8 @@ }, { "now": 1715911398.1112723, - "query_signature": "8e567c5655c884d0", - "statement": "{\"getMore\": 7156629711810917986, \"collection\": \"oplog.rs\", \"batchSize\": 13981010, \"maxTimeMS\": 5000, \"term\": 2, \"lastKnownCommittedOpTime\": {\"ts\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 17}}, \"t\": 2}, \"$replData\": 1, \"$oplogQueryData\": 1, \"$readPreference\": {\"mode\": \"secondaryPreferred\"}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 18}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"fAxz3pScinFgqdNkVCRZGX3goGY=\", \"subType\": \"00\"}}, \"keyId\": 7387155612372566021}}, \"$db\": \"local\"}", + "query_signature": "2098271ac4fceefe", + "statement": "{\"getMore\": 7156629711810917986, \"collection\": \"oplog.rs\", \"batchSize\": 13981010, \"maxTimeMS\": 5000, \"term\": 2, \"lastKnownCommittedOpTime\": {\"ts\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 17}}, \"t\": 2}, \"$replData\": 1, \"$oplogQueryData\": 1, \"$readPreference\": {\"mode\": \"secondaryPreferred\"}, \"$db\": \"local\"}", "active": true, "desc": "conn1392", "opid": 1399253104, @@ -125,9 +125,10 @@ "no_cursor_timeout": false, "tailable": true, "await_data": true, - "originating_command": "{\"find\": \"oplog.rs\", \"filter\": {\"ts\": {\"$gte\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 17}}}}, \"batchSize\": 13981010, \"tailable\": true, \"awaitData\": true, \"term\": 2, \"maxTimeMS\": 60000, \"readConcern\": {\"level\": \"local\", \"afterClusterTime\": {\"$timestamp\": {\"t\": 0, \"i\": 1}}}, \"$replData\": 1, \"$oplogQueryData\": 1, \"$readPreference\": {\"mode\": \"secondaryPreferred\"}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 18}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"fAxz3pScinFgqdNkVCRZGX3goGY=\", \"subType\": \"00\"}}, \"keyId\": 7387155612372566021}}, \"$db\": \"local\"}", + "originating_command": "{\"find\": \"oplog.rs\", \"filter\": {\"ts\": {\"$gte\": {\"$timestamp\": {\"t\": 1720208938, \"i\": 17}}}}, \"batchSize\": 13981010, \"tailable\": true, \"awaitData\": true, \"term\": 2, \"maxTimeMS\": 60000, \"readConcern\": {\"level\": \"local\", \"afterClusterTime\": {\"$timestamp\": {\"t\": 0, \"i\": 1}}}, \"$replData\": 1, \"$oplogQueryData\": 1, \"$readPreference\": {\"mode\": \"secondaryPreferred\"}, \"$db\": \"local\"}", "plan_summary": null, - "operation_using_cursor_id": 1399253104 + "operation_using_cursor_id": 1399253104, + "comment": "oplogReplay" }, "type": "op", "op": "getmore", diff --git a/mongo/tests/results/operation-samples-mongos.json b/mongo/tests/results/operation-samples-mongos.json index fd946d31fee4e..295bd488866ce 100644 --- a/mongo/tests/results/operation-samples-mongos.json +++ b/mongo/tests/results/operation-samples-mongos.json @@ -696,10 +696,10 @@ }, "signature": "5991253f621eccd0" }, - "query_signature": "6324f030638a5dc0", + "query_signature": "50114961ffa245f7", "application": null, "user": "test", - "statement": "{\"find\": \"users\", \"projection\": {\"$sortKey\": {\"$meta\": \"sortKey\"}}, \"sort\": {\"user_id\": 1}, \"needsMerge\": true, \"let\": {\"CLUSTER_TIME\": {\"$literal\": {\"t\": 1716215816, \"i\": 1}}, \"NOW\": {\"$literal\": \"2024-05-20T14:36:56.231+00:00\"}}, \"fromMongos\": true, \"singleBatch\": false, \"writeConcern\": {\"w\": \"majority\", \"wtimeout\": 0, \"provenance\": \"implicitDefault\"}, \"readConcern\": {\"level\": \"local\", \"provenance\": \"implicitDefault\"}, \"shardVersion\": {\"t\": {\"$timestamp\": {\"t\": 1716215708, \"i\": 12}}, \"e\": {\"$oid\": \"664b5f9d05fee29701ab2bfb\"}, \"v\": {\"$timestamp\": {\"t\": 1, \"i\": 7}}}, \"clientOperationKey\": {\"$binary\": {\"base64\": \"cZAjiXzbSZianZ+RrPdTaA==\", \"subType\": \"04\"}}, \"comment\": \"sort\", \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"/5W615FQTDardJroxkDVTg==\", \"subType\": \"04\"}}, \"uid\": {\"$binary\": {\"base64\": \"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\", \"subType\": \"00\"}}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1716215816, \"i\": 1}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\", \"subType\": \"00\"}}, \"keyId\": 0}}, \"$configTime\": {\"$timestamp\": {\"t\": 1716215814, \"i\": 1}}, \"$topologyTime\": {\"$timestamp\": {\"t\": 1716215696, \"i\": 24}}, \"$audit\": {\"$impersonatedUsers\": [{\"user\": \"test\", \"db\": \"admin\"}], \"$impersonatedRoles\": [{\"role\": \"root\", \"db\": \"admin\"}]}, \"$client\": {\"driver\": {\"name\": \"PyMongo\", \"version\": \"4.7.2\"}, \"os\": {\"type\": \"Darwin\", \"name\": \"Darwin\", \"architecture\": \"arm64\", \"version\": \"14.4.1\"}, \"platform\": \"CPython 3.9.16.final.0\", \"mongos\": {\"host\": \"7203110cbd0b:27017\", \"client\": \"192.168.65.1:39545\", \"version\": \"6.0.15\"}}, \"mayBypassWriteBlocking\": true, \"$db\": \"integration\"}", + "statement": "{\"find\": \"users\", \"projection\": {\"$sortKey\": {\"$meta\": \"sortKey\"}}, \"sort\": {\"user_id\": 1}, \"needsMerge\": true, \"let\": {\"CLUSTER_TIME\": {\"$literal\": {\"t\": 1716215816, \"i\": 1}}, \"NOW\": {\"$literal\": \"2024-05-20T14:36:56.231+00:00\"}}, \"fromMongos\": true, \"singleBatch\": false, \"writeConcern\": {\"w\": \"majority\", \"wtimeout\": 0, \"provenance\": \"implicitDefault\"}, \"readConcern\": {\"level\": \"local\", \"provenance\": \"implicitDefault\"}, \"shardVersion\": {\"t\": {\"$timestamp\": {\"t\": 1716215708, \"i\": 12}}, \"e\": {\"$oid\": \"664b5f9d05fee29701ab2bfb\"}, \"v\": {\"$timestamp\": {\"t\": 1, \"i\": 7}}}, \"clientOperationKey\": {\"$binary\": {\"base64\": \"cZAjiXzbSZianZ+RrPdTaA==\", \"subType\": \"04\"}}, \"$configTime\": {\"$timestamp\": {\"t\": 1716215814, \"i\": 1}}, \"$topologyTime\": {\"$timestamp\": {\"t\": 1716215696, \"i\": 24}}, \"$audit\": {\"$impersonatedUsers\": [{\"user\": \"test\", \"db\": \"admin\"}], \"$impersonatedRoles\": [{\"role\": \"root\", \"db\": \"admin\"}]}, \"$client\": {\"driver\": {\"name\": \"PyMongo\", \"version\": \"4.7.2\"}, \"os\": {\"type\": \"Darwin\", \"name\": \"Darwin\", \"architecture\": \"arm64\", \"version\": \"14.4.1\"}, \"platform\": \"CPython 3.9.16.final.0\", \"mongos\": {\"host\": \"7203110cbd0b:27017\", \"client\": \"192.168.65.1:39545\", \"version\": \"6.0.15\"}}, \"mayBypassWriteBlocking\": true, \"$db\": \"integration\"}", "operation_metadata": { "op": "query", "shard": "shard04", @@ -712,7 +712,7 @@ }, "mongodb": { "now": 1715911398.1112723, - "query_signature": "6324f030638a5dc0", + "query_signature": "50114961ffa245f7", "active": true, "desc": "conn143", "opid": "shard04:265665", diff --git a/mongo/tests/results/operation-samples-standalone.json b/mongo/tests/results/operation-samples-standalone.json index b6c83b3c5ea5d..194c76f1c7c52 100644 --- a/mongo/tests/results/operation-samples-standalone.json +++ b/mongo/tests/results/operation-samples-standalone.json @@ -117,10 +117,10 @@ }, "signature": "466d69277a94ff1f" }, - "query_signature": "4dbd60784e36b560", + "query_signature": "a5c9a4483fa9bcdf", "application": null, "user": "test", - "statement": "{\"find\": \"products\", \"filter\": {\"$and\": [{\"data\": {\"$gt\": 0.6283678507530881}}, {\"message\": {\"$regularExpression\": {\"pattern\": \"log\", \"options\": \"\"}}}]}, \"comment\": \"find\", \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"/n9kUpUhR1ymJjEwvCySbg==\", \"subType\": \"04\"}}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1715882797, \"i\": 5}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\", \"subType\": \"00\"}}, \"keyId\": 0}}, \"$db\": \"integration\", \"$readPreference\": {\"mode\": \"primaryPreferred\"}}", + "statement": "{\"find\": \"products\", \"filter\": {\"$and\": [{\"data\": {\"$gt\": 0.6283678507530881}}, {\"message\": {\"$regularExpression\": {\"pattern\": \"log\", \"options\": \"\"}}}]}, \"$db\": \"integration\", \"$readPreference\": {\"mode\": \"primaryPreferred\"}}", "operation_metadata": { "op": "query", "shard": null, @@ -133,7 +133,7 @@ }, "mongodb": { "now": 1715911398.1112723, - "query_signature": "4dbd60784e36b560", + "query_signature": "a5c9a4483fa9bcdf", "active": true, "desc": "conn104", "opid": 1538838, diff --git a/mongo/tests/results/slow-operations-explain-plans-mongos.json b/mongo/tests/results/slow-operations-explain-plans-mongos.json index 3b6cc1d3d6fec..4bdba91867b2d 100644 --- a/mongo/tests/results/slow-operations-explain-plans-mongos.json +++ b/mongo/tests/results/slow-operations-explain-plans-mongos.json @@ -685,10 +685,10 @@ }, "signature": "5991253f621eccd0" }, - "query_signature": "55e31aa78c5bbf26", + "query_signature": "2e0dfc1416f51975", "application": null, "user": null, - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 151, \"$db\": \"test\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"limit\": 151, \"$db\": \"test\"}", "operation_metadata": { "op": "command", "ns": "test.customers", @@ -718,7 +718,8 @@ }, "cursor": { "cursor_id": 5170666760900931828, - "originating_command": null + "originating_command": null, + "comment": null } } }, @@ -1408,10 +1409,10 @@ }, "signature": "5991253f621eccd0" }, - "query_signature": "70f67e80ce895c57", + "query_signature": "6f544fbdad56d0dc", "application": null, "user": null, - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 183, \"$db\": \"test\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"limit\": 183, \"$db\": \"test\"}", "operation_metadata": { "op": "command", "ns": "test.customers", @@ -2127,10 +2128,10 @@ }, "signature": "5991253f621eccd0" }, - "query_signature": "e414c665b38186b4", + "query_signature": "cde36dfcce436712", "application": null, "user": null, - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 151, \"$db\": \"integration\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"limit\": 151, \"$db\": \"integration\"}", "operation_metadata": { "op": "command", "ns": "integration.customers", @@ -2160,7 +2161,8 @@ }, "cursor": { "cursor_id": 5170666760900931828, - "originating_command": null + "originating_command": null, + "comment": null } } }, @@ -2850,10 +2852,10 @@ }, "signature": "5991253f621eccd0" }, - "query_signature": "b290163c261f2b46", + "query_signature": "d6bf9ce5ca12a12c", "application": null, "user": null, - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 183, \"$db\": \"integration\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"limit\": 183, \"$db\": \"integration\"}", "operation_metadata": { "op": "command", "ns": "integration.customers", diff --git a/mongo/tests/results/slow-operations-explain-plans-standalone.json b/mongo/tests/results/slow-operations-explain-plans-standalone.json index 5a6d2ecdff0fd..d6f05dc173dfe 100644 --- a/mongo/tests/results/slow-operations-explain-plans-standalone.json +++ b/mongo/tests/results/slow-operations-explain-plans-standalone.json @@ -96,10 +96,10 @@ }, "signature": "c158c55ee53541f9" }, - "query_signature": "6fef821a212dde0b", + "query_signature": "7e73a3e6720168b8", "application": null, "user": "", - "statement": "{\"find\": \"customers\", \"filter\": {\"age\": {\"$gt\": 63}}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by age\", \"limit\": 34, \"$db\": \"integration\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"age\": {\"$gt\": 63}}, \"sort\": {\"name\": 1}, \"limit\": 34, \"$db\": \"integration\"}", "operation_metadata": { "op": "query", "ns": "integration.customers", @@ -236,10 +236,10 @@ }, "signature": "466d69277a94ff1f" }, - "query_signature": "55e31aa78c5bbf26", + "query_signature": "2e0dfc1416f51975", "application": null, "user": null, - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 151, \"$db\": \"test\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"limit\": 151, \"$db\": \"test\"}", "operation_metadata": { "op": "command", "ns": "test.customers", @@ -269,7 +269,8 @@ }, "cursor": { "cursor_id": 5170666760900931828, - "originating_command": null + "originating_command": null, + "comment": null } } }, @@ -380,10 +381,10 @@ }, "signature": "466d69277a94ff1f" }, - "query_signature": "70f67e80ce895c57", + "query_signature": "6f544fbdad56d0dc", "application": null, "user": null, - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 183, \"$db\": \"test\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"limit\": 183, \"$db\": \"test\"}", "operation_metadata": { "op": "command", "ns": "test.customers", diff --git a/mongo/tests/results/slow-operations-mongos.json b/mongo/tests/results/slow-operations-mongos.json index 9dd79bf19d1ec..f5875b2aa5b82 100644 --- a/mongo/tests/results/slow-operations-mongos.json +++ b/mongo/tests/results/slow-operations-mongos.json @@ -19,8 +19,9 @@ "op": "update", "ns": "test.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "a81f9d3c17192d68", - "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "28f4ba1885941f76", + "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 74, "num_yields": 4, "response_length": 0, @@ -74,8 +75,9 @@ "dbname": "test", "op": "command", "ns": "test.$cmd", - "query_signature": "c5b7bcd45c4d9e9", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"test\"}", + "query_signature": "c1df6c33f6b6c258", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"test\"}", + "comment": "update customers subscription status by age", "mills": 74, "num_yields": 4, "response_length": 60, @@ -127,8 +129,9 @@ "op": "update", "ns": "test.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "ec24a2e9aacce5a0", - "statement": "{\"q\": {\"age\": {\"$gt\": 35}}, \"u\": {\"$set\": {\"subscribed\": true}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "5390ab4d2f009230", + "statement": "{\"q\": {\"age\": {\"$gt\": 35}}, \"u\": {\"$set\": {\"subscribed\": true}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 27, "num_yields": 2, "response_length": 0, @@ -182,8 +185,9 @@ "dbname": "test", "op": "command", "ns": "test.$cmd", - "query_signature": "c5b7bcd45c4d9e9", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"test\"}", + "query_signature": "c1df6c33f6b6c258", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"test\"}", + "comment": "update customers subscription status by age", "mills": 27, "num_yields": 2, "response_length": 60, @@ -235,8 +239,9 @@ "op": "update", "ns": "test.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "a81f9d3c17192d68", - "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "28f4ba1885941f76", + "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 14, "num_yields": 0, "response_length": 0, @@ -290,8 +295,9 @@ "dbname": "test", "op": "command", "ns": "test.$cmd", - "query_signature": "c5b7bcd45c4d9e9", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"test\"}", + "query_signature": "c1df6c33f6b6c258", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"test\"}", + "comment": "update customers subscription status by age", "mills": 15, "num_yields": 0, "response_length": 60, @@ -343,11 +349,12 @@ "op": "command", "ns": "test.customers", "plan_summary": "IXSCAN { name: 1 }", - "query_signature": "55e31aa78c5bbf26", - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 151, \"$db\": \"test\"}", + "query_signature": "2e0dfc1416f51975", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"limit\": 151, \"$db\": \"test\"}", "query_hash": "A9774B9D", "plan_cache_key": "0D12DCDF", "query_framework": "classic", + "comment": "query customers by subscription status", "mills": 12, "num_yields": 0, "response_length": 14089, @@ -361,7 +368,8 @@ }, "cursor": { "cursor_id": 5170666760900931828, - "originating_command": null + "originating_command": null, + "comment": null }, "lock_stats": { "feature_compatibility_version": { @@ -382,11 +390,12 @@ "op": "command", "ns": "test.customers", "plan_summary": "IXSCAN { name: 1 }", - "query_signature": "70f67e80ce895c57", - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 183, \"$db\": \"test\"}", + "query_signature": "6f544fbdad56d0dc", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"limit\": 183, \"$db\": \"test\"}", "query_hash": "A9774B9D", "plan_cache_key": "0D12DCDF", "query_framework": "classic", + "comment": "query customers by subscription status", "mills": 14, "num_yields": 0, "response_length": 110, @@ -418,8 +427,9 @@ "op": "update", "ns": "integration.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "a81f9d3c17192d68", - "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "28f4ba1885941f76", + "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 74, "num_yields": 4, "response_length": 0, @@ -473,8 +483,9 @@ "dbname": "integration", "op": "command", "ns": "integration.$cmd", - "query_signature": "3583b3bc9478cec2", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"integration\"}", + "query_signature": "8429a2f4090d1911", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"integration\"}", + "comment": "update customers subscription status by age", "mills": 74, "num_yields": 4, "response_length": 60, @@ -526,8 +537,9 @@ "op": "update", "ns": "integration.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "ec24a2e9aacce5a0", - "statement": "{\"q\": {\"age\": {\"$gt\": 35}}, \"u\": {\"$set\": {\"subscribed\": true}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "5390ab4d2f009230", + "statement": "{\"q\": {\"age\": {\"$gt\": 35}}, \"u\": {\"$set\": {\"subscribed\": true}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 27, "num_yields": 2, "response_length": 0, @@ -581,8 +593,9 @@ "dbname": "integration", "op": "command", "ns": "integration.$cmd", - "query_signature": "3583b3bc9478cec2", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"integration\"}", + "query_signature": "8429a2f4090d1911", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"integration\"}", + "comment": "update customers subscription status by age", "mills": 27, "num_yields": 2, "response_length": 60, @@ -634,8 +647,9 @@ "op": "update", "ns": "integration.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "a81f9d3c17192d68", - "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "28f4ba1885941f76", + "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 14, "num_yields": 0, "response_length": 0, @@ -689,8 +703,9 @@ "dbname": "integration", "op": "command", "ns": "integration.$cmd", - "query_signature": "3583b3bc9478cec2", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"integration\"}", + "query_signature": "8429a2f4090d1911", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"integration\"}", + "comment": "update customers subscription status by age", "mills": 15, "num_yields": 0, "response_length": 60, @@ -742,11 +757,12 @@ "op": "command", "ns": "integration.customers", "plan_summary": "IXSCAN { name: 1 }", - "query_signature": "e414c665b38186b4", - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 151, \"$db\": \"integration\"}", + "query_signature": "cde36dfcce436712", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"limit\": 151, \"$db\": \"integration\"}", "query_hash": "A9774B9D", "plan_cache_key": "0D12DCDF", "query_framework": "classic", + "comment": "query customers by subscription status", "mills": 12, "num_yields": 0, "response_length": 14089, @@ -760,7 +776,8 @@ }, "cursor": { "cursor_id": 5170666760900931828, - "originating_command": null + "originating_command": null, + "comment": null }, "lock_stats": { "feature_compatibility_version": { @@ -781,11 +798,12 @@ "op": "command", "ns": "integration.customers", "plan_summary": "IXSCAN { name: 1 }", - "query_signature": "b290163c261f2b46", - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 183, \"$db\": \"integration\"}", + "query_signature": "d6bf9ce5ca12a12c", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"limit\": 183, \"$db\": \"integration\"}", "query_hash": "A9774B9D", "plan_cache_key": "0D12DCDF", "query_framework": "classic", + "comment": "query customers by subscription status", "mills": 14, "num_yields": 0, "response_length": 110, diff --git a/mongo/tests/results/slow-operations-standalone.json b/mongo/tests/results/slow-operations-standalone.json index 3c8b293ecd61e..9fb87db7ad7c2 100644 --- a/mongo/tests/results/slow-operations-standalone.json +++ b/mongo/tests/results/slow-operations-standalone.json @@ -18,9 +18,10 @@ "op": "update", "ns": "integration.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "1f6ad13d7f6175f0", + "query_signature": "e03d659625514901", "user": "", - "statement": "{\"q\": {\"age\": {\"$gt\": 20}}, \"u\": {\"$set\": {\"subscribed\": true}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "statement": "{\"q\": {\"age\": {\"$gt\": 20}}, \"u\": {\"$set\": {\"subscribed\": true}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 10, "num_yields": 0, "response_length": 0, @@ -77,12 +78,13 @@ "op": "query", "ns": "integration.customers", "plan_summary": "IXSCAN { name: 1 }", - "query_signature": "6fef821a212dde0b", + "query_signature": "7e73a3e6720168b8", "user": "", - "statement": "{\"find\": \"customers\", \"filter\": {\"age\": {\"$gt\": 63}}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by age\", \"limit\": 34, \"$db\": \"integration\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"age\": {\"$gt\": 63}}, \"sort\": {\"name\": 1}, \"limit\": 34, \"$db\": \"integration\"}", "query_hash": "F286520C", "plan_cache_key": "4AFF4016", "query_framework": "classic", + "comment": "query customers by age", "mills": 85, "num_yields": 1, "response_length": 110, @@ -114,9 +116,10 @@ "op": "update", "ns": "integration.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "3719fe0a5548dd23", + "query_signature": "38b472e7c8044e58", "user": "", - "statement": "{\"q\": {\"age\": {\"$gt\": 20}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "statement": "{\"q\": {\"age\": {\"$gt\": 20}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 21, "num_yields": 1, "response_length": 0, @@ -173,12 +176,13 @@ "op": "query", "ns": "integration.customers", "plan_summary": "IXSCAN { name: 1 }", - "query_signature": "6fef821a212dde0b", + "query_signature": "7e73a3e6720168b8", "user": "", - "statement": "{\"find\": \"customers\", \"filter\": {\"age\": {\"$gt\": 63}}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by age\", \"limit\": 34, \"$db\": \"integration\"}", + "statement": "{\"find\": \"customers\", \"filter\": {\"age\": {\"$gt\": 63}}, \"sort\": {\"name\": 1}, \"limit\": 34, \"$db\": \"integration\"}", "query_hash": "F286520C", "plan_cache_key": "4AFF4016", "query_framework": "classic", + "comment": "query customers by age", "mills": 14, "num_yields": 1, "response_length": 110, @@ -212,8 +216,9 @@ "op": "update", "ns": "test.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "a81f9d3c17192d68", - "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "28f4ba1885941f76", + "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 74, "num_yields": 4, "response_length": 0, @@ -267,8 +272,9 @@ "dbname": "test", "op": "command", "ns": "test.$cmd", - "query_signature": "c5b7bcd45c4d9e9", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"test\"}", + "query_signature": "c1df6c33f6b6c258", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"test\"}", + "comment": "update customers subscription status by age", "mills": 74, "num_yields": 4, "response_length": 60, @@ -320,8 +326,9 @@ "op": "update", "ns": "test.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "ec24a2e9aacce5a0", - "statement": "{\"q\": {\"age\": {\"$gt\": 35}}, \"u\": {\"$set\": {\"subscribed\": true}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "5390ab4d2f009230", + "statement": "{\"q\": {\"age\": {\"$gt\": 35}}, \"u\": {\"$set\": {\"subscribed\": true}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 27, "num_yields": 2, "response_length": 0, @@ -375,8 +382,9 @@ "dbname": "test", "op": "command", "ns": "test.$cmd", - "query_signature": "c5b7bcd45c4d9e9", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"test\"}", + "query_signature": "c1df6c33f6b6c258", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"test\"}", + "comment": "update customers subscription status by age", "mills": 27, "num_yields": 2, "response_length": 60, @@ -428,8 +436,9 @@ "op": "update", "ns": "test.customers", "plan_summary": "IXSCAN { age: -1 }", - "query_signature": "a81f9d3c17192d68", - "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false, \"comment\": \"update customers subscription status by age\"}", + "query_signature": "28f4ba1885941f76", + "statement": "{\"q\": {\"age\": {\"$gt\": 18}}, \"u\": {\"$set\": {\"subscribed\": false}}, \"multi\": true, \"upsert\": false}", + "comment": "update customers subscription status by age", "mills": 14, "num_yields": 0, "response_length": 0, @@ -483,8 +492,9 @@ "dbname": "test", "op": "command", "ns": "test.$cmd", - "query_signature": "c5b7bcd45c4d9e9", - "statement": "{\"update\": \"customers\", \"ordered\": true, \"comment\": \"update customers subscription status by age\", \"$db\": \"test\"}", + "query_signature": "c1df6c33f6b6c258", + "statement": "{\"update\": \"customers\", \"ordered\": true, \"$db\": \"test\"}", + "comment": "update customers subscription status by age", "mills": 15, "num_yields": 0, "response_length": 60, @@ -536,11 +546,12 @@ "op": "command", "ns": "test.customers", "plan_summary": "IXSCAN { name: 1 }", - "query_signature": "55e31aa78c5bbf26", - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 151, \"$db\": \"test\"}", + "query_signature": "2e0dfc1416f51975", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": false}, \"sort\": {\"name\": 1}, \"limit\": 151, \"$db\": \"test\"}", "query_hash": "A9774B9D", "plan_cache_key": "0D12DCDF", "query_framework": "classic", + "comment": "query customers by subscription status", "mills": 12, "num_yields": 0, "response_length": 14089, @@ -554,7 +565,8 @@ }, "cursor": { "cursor_id": 5170666760900931828, - "originating_command": null + "originating_command": null, + "comment": null }, "lock_stats": { "feature_compatibility_version": { @@ -575,11 +587,12 @@ "op": "command", "ns": "test.customers", "plan_summary": "IXSCAN { name: 1 }", - "query_signature": "70f67e80ce895c57", - "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"comment\": \"query customers by subscription status\", \"limit\": 183, \"$db\": \"test\"}", + "query_signature": "6f544fbdad56d0dc", + "statement": "{\"find\": \"customers\", \"filter\": {\"subscribed\": true}, \"sort\": {\"name\": 1}, \"limit\": 183, \"$db\": \"test\"}", "query_hash": "A9774B9D", "plan_cache_key": "0D12DCDF", "query_framework": "classic", + "comment": "query customers by subscription status", "mills": 14, "num_yields": 0, "response_length": 110,