Skip to content

Fix polling observer issue with inode recycling#304

Open
jrichards99 wants to merge 2 commits into
gorakhargosh:masterfrom
jrichards99:master
Open

Fix polling observer issue with inode recycling#304
jrichards99 wants to merge 2 commits into
gorakhargosh:masterfrom
jrichards99:master

Conversation

@jrichards99

Copy link
Copy Markdown

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

BoboTiG commented Oct 13, 2018

Copy link
Copy Markdown
Collaborator

WDYT @tamland and @danilobellini ?

@cjh1

cjh1 commented Nov 4, 2022

Copy link
Copy Markdown

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

@BoboTiG

BoboTiG commented Nov 4, 2022

Copy link
Copy Markdown
Collaborator

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

@cjh1

cjh1 commented Nov 4, 2022

Copy link
Copy Markdown

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.

@mcratt

mcratt commented Dec 28, 2024

Copy link
Copy Markdown

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.

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.

4 participants