#2220 closed defect (fixed)
drop-upload on Windows: multiple change events should be collapsed together
Reported by: | daira | Owned by: | daira |
---|---|---|---|
Priority: | normal | Milestone: | 1.12.0 |
Component: | code-frontend-magic-folder | Version: | n/a |
Keywords: | drop-upload windows test otf-magic-folder-objective2 | Cc: | |
Launchpad Bug: |
Description
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.
Change History (7)
comment:1 Changed at 2014-04-14T15:47:15Z by daira
comment:2 Changed at 2014-04-15T01:09:22Z by daira
- Owner set to daira
- Status changed from new to assigned
- Summary changed from drop-upload on Windows: multiple change events should be suppressed to drop-upload on Windows: multiple change events should be collapsed together
comment:3 Changed at 2014-04-15T01:10:32Z by daira
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.
comment:4 Changed at 2014-12-02T19:51:58Z by warner
- Component changed from code-frontend to code-frontend-drop-upload
comment:5 Changed at 2015-04-02T14:57:03Z by daira
- Keywords otf-magic-folder-objective2 added
comment:6 Changed at 2015-04-12T22:36:45Z by daira
- Milestone changed from undecided to 1.11.0
- Resolution set to fixed
- Status changed from assigned to closed
comment:7 Changed at 2016-03-22T05:02:52Z by warner
- Milestone changed from 1.11.0 to 1.12.0
Milestone renamed
Note: See
TracTickets for help on using
tickets.
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.