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] gracefully fail on operation samples colleciton when node is in recovering mode #19080

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

lu-zhengda
Copy link
Contributor

What does this PR do?

Fixes a bug that caused the MongoDB DBM operation samples collection to crash when a node is in recovering mode.

Motivation

Previously, the DBM operation samples collection could crash with a NotPrimaryError if a node entered recovering mode. This situation often occurs when a MongoDB node is disconnected from the replica set for an extended period and is catching up on replication after rejoining the set. This PR ensures the integration can gracefully handle nodes in recovery, preventing unexpected crashes.

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

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 91.89189% with 3 lines in your changes missing coverage. Please review.

Project coverage is 87.06%. Comparing base (6daceec) to head (f7d833b).
Report is 5 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
mongo 93.05% <91.89%> (-0.54%) ⬇️
presto ?
solr ?

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

---- 🚨 Try these New Features:

@lu-zhengda lu-zhengda added this pull request to the merge queue Nov 19, 2024
Merged via the queue into master with commit 7b18212 Nov 19, 2024
47 of 48 checks passed
@lu-zhengda lu-zhengda deleted the zhengda.lu/mongo-not-primary branch November 19, 2024 13:03
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