Active
Project:
MongoDB
Version:
8.x-2.x-dev
Component:
Watchdog (logger)
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2026 at 11:18 UTC
Updated:
29 Sep 2026 at 11:18 UTC
Jump to comment: Most recent
Logger::ensureCappedCollection() in mongodb_watchdog runs the collStats command, only to read the capped flag of the request tracker collection.
MongoDB deprecated the collStats command in server 6.2: see its documentation. It still works on the currently supported servers (8.3, 8.0 and 7.0), but will fail once a server version removes it.
Read the flag from listCollections instead, which is not deprecated: $database->listCollections(['filter' => ['name' => $name]]), then CollectionInfo::isCapped() on the result. Both exist in the MongoDB library 2.x and 1.x, so this works with either driver.
None.
None.
None.
This issue and MR are developed with AI assistance
Comments