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 driver update & less frequent database polls #8026

Merged
merged 11 commits into from Oct 12, 2023
Merged

Conversation

sulkaharo
Copy link
Member

@sulkaharo sulkaharo commented May 29, 2023

  • Increase debounce for data loads to 15 seconds and trigger a data-loaded event to process local data updates even if the call is debounced.
  • Updates the database drivers to latest.
  • Removes support for OpenAPS local file storage

Maybe fixes #8024

@bewest
Copy link
Member

bewest commented Jun 2, 2023

Nice upgrade to mongodb drivers!

@sulkaharo sulkaharo changed the title Less frequent Mongo updates Mongo driver update & less frequent database polls Jun 2, 2023
@bewest
Copy link
Member

bewest commented Jun 7, 2023

Testing this, and it does something weird in some of my test environments. On some environments it can't bootstrap the connection correctly, but it's not clear if it may be a server misconfiguration issue.

@RickyGrassmuck
Copy link

Looking forward to seeing this get merged!

I explored using FerretDB (An alternative to Mongodb that is backed by postgres), which requires using updated mongo driver compatible with Mongodb 6+ to work, as a replacement for Mongodb and early testing looked promising but I didn't have the bandwidth for diving in to fix all the little incompatiblies needed so I had to shelve the idea.

If/when this gets merged, definitely going to be revisiting that project and see if it's truly a viable option to replace Mongodb!

@RickyGrassmuck
Copy link

Testing this, and it does something weird in some of my test environments. On some environments it can't bootstrap the connection correctly, but it's not clear if it may be a server misconfiguration issue.

Happy to spin up some test instances and see if I can replicate the connection issues.

@bewest
Copy link
Member

bewest commented Aug 8, 2023

Howdy @RickyGrassmuck, this is on track to be merged. I've been ultra-conservative testing scenarios on databases that run in replica set and that have been migrated or have mixed upgrade/migration status or even broken cluster configurations.

@bewest
Copy link
Member

bewest commented Oct 12, 2023

Finally catching up on my backlog. Additional testing, and I like this. If the startup boot sequence will more predictably take 15 seconds instead of 5 seconds it might make a nice first-time contribution for someone.
Additionally, this looks ok in node 14, 16, and 18, so thinking about adding node 18 to the compat list.

Given node 18 and 20, allow running on any LTS version of node.
We can block out bad versions if needed.
Use npm install under node 14 generates different lock file.
This patch adjusts the user feedback while the server is initializing to
communicate that Nightscout startup sequence should take closer to 15 second
than 5 seconds.
Record output of npm instlal using oldest supported version.
Record changes from upgrading nightscout-connect to at least the latest
release, 0.0.12.
@bewest bewest merged commit 2757fe5 into dev Oct 12, 2023
8 checks passed
@bewest bewest mentioned this pull request Oct 19, 2023
bewest added a commit that referenced this pull request Oct 19, 2023
…ates"

This reverts commit 2757fe5, reversing
changes made to 4a461e5.
bewest added a commit that referenced this pull request Oct 20, 2023
Revert "Merge pull request #8026 from nightscout/less_frequent_db_upd…
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.

None yet

3 participants