putting a larger file in synced folder generates large amount of Watcher events
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Syncany |
Confirmed
|
Undecided
|
Philipp C. Heckel |
Bug Description
When I copy a somewhat larger file (e.g. a couple of megabytes) into the synchronized folder then this generates a very large amount of file watcher events and corresponding indexer updates.
11-07-03 20:39:24 | vulcan | BufferedWatcher | BufWatchTimer | INFO : ENTRY_CREATE /home/bjd/
11-07-03 20:39:24 | vulcan | LocalWatcher | BufWatchTimer | INFO : Watcher: Checking new/modified file /home/bjd/
11-07-03 20:39:24 | vulcan | LocalWatcher | BufWatchTimer | INFO : Watcher: Checking new/modified file /home/bjd/
11-07-03 20:39:24 | vulcan | Indexer | Indexer | INFO : Processing request org.syncany.
11-07-03 20:39:24 | vulcan | LocalWatcher | BufWatchTimer | INFO : Watcher: Checking new/modified file /home/bjd/
11-07-03 20:39:24 | vulcan | CheckIndexRequest | Indexer | INFO : Indexer: Checking file /home/bjd/
11-07-03 20:39:24 | vulcan | LocalWatcher | BufWatchTimer | INFO : Watcher: Checking new/modified file /home/bjd/
11-07-03 20:39:24 | vulcan | LocalWatcher | BufWatchTimer | INFO : Watcher: Checking new/modified file /home/bjd/
11-07-03 20:39:24 | vulcan | LocalWatcher | BufWatchTimer | INFO : Watcher: Checking new/modified file /home/bjd/
... <repeated lots of times> ...
11-07-03 20:39:25 | vulcan | Indexer | Indexer | INFO : Processing request org.syncany.
11-07-03 20:39:25 | vulcan | CheckIndexRequest | Indexer | INFO : Indexer: Checking file /home/bjd/
11-07-03 20:39:25 | vulcan | CheckIndexRequest | Indexer | INFO : File found in DB. Same modified date, same size. Nothing to do!
11-07-03 20:39:25 | vulcan | CheckIndexRequest | Indexer | INFO : Checking file DONE: /home/bjd/
11-07-03 20:39:25 | vulcan | Indexer | Indexer | INFO : Processing request org.syncany.
11-07-03 20:39:25 | vulcan | CheckIndexRequest | Indexer | INFO : Indexer: Checking file /home/bjd/
11-07-03 20:39:25 | vulcan | CheckIndexRequest | Indexer | INFO : File found in DB. Same modified date, same size. Nothing to do!
11-07-03 20:39:25 | vulcan | CheckIndexRequest | Indexer | INFO : Checking file DONE: /home/bjd/
11-07-03 20:39:25 | vulcan | Indexer | Indexer | INFO : Processing request org.syncany.
... <repeated lots of times> ...
Moving parentKey.reset() from the BufferedWatcher worker thread to the end of processEvent() to hold of any new events until after processing seems to solve this (see attached patch).
Great thanks, I'll merge this in the newsync branch tomorrow.