Skip to content

[Backport 7.68.x] force maxTimeMS for mongo integration queries #20516

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 1 commit into from
Jun 16, 2025

Conversation

datadog-agent-integrations-bot[bot]
Copy link
Contributor

Backport 29bdc09 from #20515.


What does this PR do?

This PR adds maxTimeMS to limit agent resource consumption and prevent operations from running indefinitely on the server side.
maxTimeMS ensures queries are properly terminated in addition to the client side operation timeout set by timeoutMS.

Motivation

https://datadoghq.atlassian.net/browse/SDBM-1738

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

* force maxTimeMS for mongo integration queries

* add changelog

* set api._timeout

(cherry picked from commit 29bdc09)
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.49%. Comparing base (b2f7118) to head (481fd83).
Report is 1 commits behind head on 7.68.x.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
confluent_platform ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
mongo 93.12% <90.47%> (+<0.01%) ⬆️
presto ?
solr ?
tomcat ?
weblogic ?

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lu-zhengda
Copy link
Contributor

Sample agent query with maxTimeMS set
image

@nubtron nubtron merged commit 7f50ad3 into 7.68.x Jun 16, 2025
51 checks passed
@nubtron nubtron deleted the backport-20515-to-7.68.x branch June 16, 2025 15:38
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.

4 participants