-
Notifications
You must be signed in to change notification settings - Fork 808
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
MongoDB - Fix Unhealthy if no collections exists in the specified database #1626
Conversation
Thanks. |
@ThumNet One test failed. I think |
Looking into the failing test, will update the PR when fixed. |
After looking into the failing test, which is called I think that this test should NOT exists, because of the way mongodb works. MongoDB only creates the database when you first store data in that database. This data could be a collection or a document. Sources: official mongo docs and blog post @sungam3r Do you agree the test can be removed? |
I've read provided links. Do you think the current method of checking the state of MongoDB is sufficient? I have no experience with MongoDB. |
Instead of getting the collections i think it is better to implement a ping to the database. Others also recommend this. I will change the code to allow this and update the PR. Also change the test accordingly. |
@sungam3r Update has just been pushed. |
@ThumNet Thanks. |
What this PR does / why we need it:
We are experiencing unhealthy checks if a specified mongo database has no collections yet.
Which issue(s) this PR fixes:
#617
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?:
No
Please make sure you've completed the relevant tasks for this PR, out of the following list: