Skip to content

CDRIVER-4556 Remove use of collStats #1249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 28, 2023
Merged

Conversation

kevinAlbs
Copy link
Collaborator

@kevinAlbs kevinAlbs commented Apr 27, 2023

Summary

  • Remove use of collStats

Background & Motivation

From DRIVERS-2232:

For drivers that have helpers for collStats or currentOp, the helpers should be adjusted to use the $collStats / $currentOp aggregation pipeline stages. Alternatively, drivers can deprecate these helpers for future removal. This is left to the discretion of drivers.

mongoc_collection_stats is already deprecated. Examples using mongoc_collection_stats were updated to use aggregation with the $collStats pipeline stage. There is no helper for currentOp.


Example code was moved from .rst files into the examples directory and included with the literalinclude directive. This is intended to have the examples compile in Evergreen.


The runCommand Example 2 example, which used collStats, was removed. This example was added for the documentation team in DRIVERS-448. DOCSP-21320 requests removing runCommand Example 2 from documentation.

@kevinAlbs kevinAlbs marked this pull request as ready for review April 27, 2023 19:38
Co-authored-by: Ezra Chung <[email protected]>
Copy link
Contributor

@vector-of-bool vector-of-bool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I was unaware of the start-after and end-before options. Very useful!

@kevinAlbs kevinAlbs merged commit 2d27a11 into mongodb:master Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants