-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Immediately dirty optimistic functions when relevant paths modified. #9007
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abernix
approved these changes
Aug 11, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Your explanation makes a lot of sense!
Should fix #8988 and #8942. Now that #8866 is the default behavior, it can take up to 5000ms for changes to files modified during the build process to be noticed. Before #8866, when we called e.g. files.writeFile(path), a native file watcher would notice the change immediately, almost always before the build process read the file again. This was definitely racy, but we were getting away with it consistently... until #8866. I was able to reproduce the problem in #8988 by running echo some-local-package-name >> .meteor/packages in an app with a local package of the given name. After debugging the endless rebuild cycle, I found that .meteor/versions was being rewritten by files.writeFile during the build process, but the file watching system was not noticing the change in time to prevent watch.isUpToDate from returning true. The change was finally detected when restarting the Watcher responsible for .meteor/versions, which of course triggered another rebuild, so the same problem kept happening again and again.
ac9af91
to
1bfd510
Compare
1bfd510
to
9e4d160
Compare
hwillson
approved these changes
Aug 11, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch @benjamn - looks great!
9e4d160
to
4dfa9c3
Compare
This was referenced Nov 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Should fix #8988 and #8942.
Now that #8866 is the default behavior, it can take up to 5000ms for changes to files modified during the build process to be noticed.
Before #8866, when we called e.g.
files.writeFile(path)
, a native file watcher would notice the change immediately, almost always before the build process read the file again. This was definitely racy, but we were getting away with it consistently... until #8866.I was able to reproduce the problem in #8988 by running
in an app with a local package of the given name. After debugging the endless rebuild cycle, I found that
.meteor/versions
was being rewritten byfiles.writeFile
during the build process, but the file watching system was not noticing the change in time to preventwatch.isUpToDate
from returningtrue
. The change was finally detected when restarting the Watcher responsible for.meteor/versions
, which of course triggered another rebuild, so the same problem kept happening again and again.