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

Reload db when it was actually modified #850

Merged
merged 2 commits into from
Oct 1, 2024
Merged

Conversation

frenzzy
Copy link
Contributor

@frenzzy frenzzy commented Jul 2, 2024

From Node.js documentation:

To be notified when the file was modified, not just accessed, it is necessary to compare curr.mtimeMs and prev.mtimeMs.

[From Node.js documentation:](https://nodejs.org/docs/latest/api/fs.html#fswatchfilefilename-options-listener)

> To be notified when the file was modified, not just accessed, it is necessary to compare `curr.mtimeMs` and `prev.mtimeMs`.
@runk
Copy link
Owner

runk commented Jul 3, 2024

Did you experience a lot of reloads due to out-of-process file access operations?

@runk
Copy link
Owner

runk commented Jul 3, 2024

Happy to accept the PR once tests fixed

@frenzzy
Copy link
Contributor Author

frenzzy commented Jul 4, 2024

I just thought (though untested) that in a multi-replica app, it might cause unnecessary reloads in all instances when one of them reads the file.

Node.js typings was wrong: DefinitelyTyped/DefinitelyTyped#69990

@runk
Copy link
Owner

runk commented Oct 1, 2024

This was merged by mistake and now reverted via #862

Copy link

github-actions bot commented Oct 1, 2024

🎉 This PR is included in version 4.3.22 🎉

The release is available on:

Your semantic-release bot 📦🚀

@frenzzy frenzzy deleted the patch-1 branch October 1, 2024 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants