drop-upload on Windows: multiple change events should be collapsed together #2220

Closed
opened 2014-04-14 15:34:51 +00:00 by daira · 3 comments
daira commented 2014-04-14 15:34:51 +00:00
Owner

The Windows ReadDirectoryChangesW API returns multiple events when a file is created or modified. This is correct (the file has been modified multiple times, and the intermediate state is observable), but it currently results in redundant uploads, which causes the tests to fail.

On Linux, we use IN_CLOSE_WRITE which only fires a single event when a file is closed, but Windows has no direct equivalent to that.

The Windows [ReadDirectoryChangesW](http://msdn.microsoft.com/en-us/library/aa365465%28v=vs.85%29.aspx) API returns multiple events when a file is created or modified. This is correct (the file *has* been modified multiple times, and the intermediate state is observable), but it currently results in redundant uploads, which causes the tests to fail. On Linux, we use `IN_CLOSE_WRITE` which only fires a single event when a file is closed, but Windows has no direct equivalent to that.
tahoe-lafs added the
code-frontend
normal
defect
n/a
labels 2014-04-14 15:34:51 +00:00
tahoe-lafs added this to the undecided milestone 2014-04-14 15:34:51 +00:00
daira commented 2014-04-14 15:47:15 +00:00
Author
Owner

It's a long time since I worked on this code but I believe the pending_delay was originally supposed to work around this issue. It's not working as intended though.

allmydata.windows.inotify.simple_test() can be used to smoke-test the behaviour of ReadDirectoryChangesW.

It's a long time since I worked on this code but I believe the `pending_delay` was originally supposed to work around this issue. It's not working as intended though. `allmydata.windows.inotify.simple_test()` can be used to smoke-test the behaviour of `ReadDirectoryChangesW`.
tahoe-lafs changed title from drop-upload on Windows: multiple change events should be suppressed to drop-upload on Windows: multiple change events should be collapsed together 2014-04-15 01:09:22 +00:00
daira commented 2014-04-15 01:10:32 +00:00
Author
Owner

See also #1440. It might be preferable to use the same mechanism to suppress redundant uploads on all platforms, rather than implementing something Windows-specific.

See also #1440. It might be preferable to use the same mechanism to suppress redundant uploads on all platforms, rather than implementing something Windows-specific.
warner removed the
code-frontend
label 2014-12-02 19:51:58 +00:00
tahoe-lafs added the
fixed
label 2015-04-12 22:36:45 +00:00
tahoe-lafs modified the milestone from undecided to 1.11.0 2015-04-12 22:36:45 +00:00
daira closed this issue 2015-04-12 22:36:45 +00:00

Milestone renamed

Milestone renamed
warner modified the milestone from 1.11.0 to 1.12.0 2016-03-22 05:02:52 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2220
No description provided.