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

Fix polling observer issue with inode recycling #304

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix polling observer issue with inode recycling #304

wants to merge 2 commits into from

Conversation

jrichards99
Copy link

Fork to address issue documents in issue 303:

#303

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.
@BoboTiG
Copy link
Collaborator

BoboTiG commented Oct 13, 2018

WDYT @tamland and @danilobellini ?

@cjh1
Copy link

cjh1 commented Nov 4, 2022

We are also running into this, any chance of getting this fix merged?

@BoboTiG
Copy link
Collaborator

BoboTiG commented Nov 4, 2022

See #303 (comment). If think it's better to close that PR.

@cjh1
Copy link

cjh1 commented Nov 4, 2022

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.

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.

3 participants