SandstoneHPC / sandstonehpc-project

A central repository for Sandstone HPC project issues, bugs, roadmaps, and documentation.
https://sandstonehpc.github.io
MIT License
4 stars 1 forks source link

Erroneous changed on disk notification #98

Open zebulasampedro opened 7 years ago

zebulasampedro commented 7 years ago

On the sandstone dev vagrant box, if a file in /tmp/ is modified and saved in the code editor, an erroneous file changed on disk notification appears. This does not happen in /home/, nor in the staging environment.

zebulasampedro commented 7 years ago

After the v.1.1.1 PR, this has been observed in the staging environment as well.

The error can be reproduced only when using the keyboard shortcut for saving a file if no digest cycle has been triggered for the TabsCtrl, but not when using the dropdown menu on the document tab (using the dropdown menu triggers a digest cycle).

zebulasampedro commented 7 years ago

Upon further investigation the digest cycles do not actually effect the correct execution of the display logic. The issue it turns out is that python-watchdog is firing multiple modification events for a single write.

Watchdog only fires two events on certain filesystems though. This has been observed thus far on tmp and and network filesystems, but cannot be reproduced on a normal home directory.

zebulasampedro commented 7 years ago

Nope. Watchdog is performing as expected.

Turns out that the FilesystemService.writeFileContents method is actually just being called twice on save when saving is prompted by the keyboard shortcut.