Fix polling observer issue with inode recycling#304
Open
jrichards99 wants to merge 2 commits into
Open
Conversation
Fix issue where one file was deleted and another file was created and the created file was assigned the inode of the deleted file. This resulted in watchdog firing a moved event even though the files were totally unrelated. Inodes can and will be recycled, it was happening frequently in our use case, depending solely on inode number to determine it is the same file won't work. This change checks modification time before determining that the file with the given inode was moved instead of deleted/created.
… then move vs file delete then create, this test case now tests for delete and create in this scenario. Also, not all versions of Linux have nanosecond resolution on stat m_time (CentOS 5.10 did not) so fix wait time that assumed this was the case.
Collaborator
|
WDYT @tamland and @danilobellini ? |
|
We are also running into this, any chance of getting this fix merged? |
Collaborator
|
See #303 (comment). If think it's better to close that PR. |
|
OK, but the current implementation gives spurious move events? I tend to agree with @jrichards99 that modify/move being reported as delete/create is closer to the truth and certainly more useful than the inaccurate move events. |
|
I referred to this PR and modified my code accordingly. I included the link to this PR, which resulted in the creation of this cross-reference. However, the content might not be highly relevant. If possible, please remove this cross-reference. |
This file contains hidden or 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
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.
Fork to address issue documents in issue 303:
#303