Skip to content

Conversation

@FelixMarxIBM
Copy link

@FelixMarxIBM FelixMarxIBM commented Aug 30, 2023

Writing a file is a 2 step process where the file is created empty and then filled
There is a race-condition, where the DirectoryWatcher might pick up the creation of the empty file.
This empty file will be written back to disk on a follow-up CM_UPDATED event.
Using the global write lock will block the DirectoryWatcher to wait for the write to finish and therefore never to read an empty file.

* Writing a file is a 2 step process where the file is created empty and then filled
* There is a race-condition, where the DirectoryWatcher might pick up the creation of the
* empty file. This empty file will be written back to disk on a follow-up CM_UPDATED event.
* Using the global write lock will block the DirectoryWatcher to wait for the write to finish
* and therefore never to read an empty file.
@FelixMarxIBM
Copy link
Author

I'll try to create a test for this race-condition but doing that might be hard to accomplish.

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.

1 participant