Skip to content
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

[mongo] Resolve deprecated collStats command in oplog size collection #19133

Merged
merged 6 commits into from
Nov 25, 2024

Conversation

lu-zhengda
Copy link
Contributor

@lu-zhengda lu-zhengda commented Nov 25, 2024

What does this PR do?

This PR resolves deprecated collStats command warning in oplog size collection. For MongoDB versions newer than 6.2, $collStats aggregation pipeline is used to get oplog size from local database.

Motivation

Resolve deprecation message "The collStats command is deprecated. For more information, see https://dochub.mongodb.org/core/collStats-deprecated"
https://datadoghq.atlassian.net/browse/SDBM-1338

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@lu-zhengda lu-zhengda marked this pull request as ready for review November 25, 2024 19:20
@lu-zhengda lu-zhengda requested review from a team as code owners November 25, 2024 19:20
mongo/datadog_checks/mongo/api.py Outdated Show resolved Hide resolved
mongo/datadog_checks/mongo/api.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 61.76471% with 13 lines in your changes missing coverage. Please review.

Project coverage is 87.45%. Comparing base (0dc1f49) to head (4cf6a2d).
Report is 2 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
mongo 92.98% <61.76%> (-0.60%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@lu-zhengda lu-zhengda added this pull request to the merge queue Nov 25, 2024
Merged via the queue into master with commit ee0f3e3 Nov 25, 2024
39 checks passed
@lu-zhengda lu-zhengda deleted the zhengda.lu/mongo-coll branch November 25, 2024 21:51
nubtron pushed a commit that referenced this pull request Nov 26, 2024
…#19133)

* deprecate collStats in oplog size collection

* fix lint

* fix replication oplog size

* add changelog

* typos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants