← Back to team overview

syncany-team team mailing list archive

Re: [Bug 805210] Re: putting a larger file in synced folder generates large amount of Watcher events

 

I fixed it in my newsync branch; It now removes all outdated MODIFY
events for the same file. Check it out here:
http://bazaar.launchpad.net/~binwiederhier/syncany/newsync/revision/67#syncany/syncany-core/src/main/java/name/pachler/nio/file/contrib/BufferedWatcher.java

What do you think? It's probably not perfect since the event queue is
(once again) walked through, but it's better than passing every single
event to the indexer.

-- 
You received this bug notification because you are a member of Syncany
Team, which is subscribed to Syncany.
https://bugs.launchpad.net/bugs/805210

Title:
  putting a larger file in synced folder generates large amount of
  Watcher events

Status in Syncany:
  Confirmed

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/Public/CIMG2015.JPG
  11-07-03 20:39:24 | vulcan     | LocalWatcher         | BufWatchTimer      | INFO     : Watcher: Checking new/modified file /home/bjd/Public/CIMG2015.JPG
  11-07-03 20:39:24 | vulcan     | LocalWatcher         | BufWatchTimer      | INFO     : Watcher: Checking new/modified file /home/bjd/Public/CIMG2015.JPG
  11-07-03 20:39:24 | vulcan     | Indexer              | Indexer            | INFO     : Processing request org.syncany.index.requests.CheckIndexRequest@746ac18c
  11-07-03 20:39:24 | vulcan     | LocalWatcher         | BufWatchTimer      | INFO     : Watcher: Checking new/modified file /home/bjd/Public/CIMG2015.JPG
  11-07-03 20:39:24 | vulcan     | CheckIndexRequest    | Indexer            | INFO     : Indexer: Checking file /home/bjd/Public/CIMG2015.JPG ... 
  11-07-03 20:39:24 | vulcan     | LocalWatcher         | BufWatchTimer      | INFO     : Watcher: Checking new/modified file /home/bjd/Public/CIMG2015.JPG
  11-07-03 20:39:24 | vulcan     | LocalWatcher         | BufWatchTimer      | INFO     : Watcher: Checking new/modified file /home/bjd/Public/CIMG2015.JPG
  11-07-03 20:39:24 | vulcan     | LocalWatcher         | BufWatchTimer      | INFO     : Watcher: Checking new/modified file /home/bjd/Public/CIMG2015.JPG
  ... <repeated lots of times> ...

  11-07-03 20:39:25 | vulcan     | Indexer              | Indexer            | INFO     : Processing request org.syncany.index.requests.CheckIndexRequest@51d7aa64
  11-07-03 20:39:25 | vulcan     | CheckIndexRequest    | Indexer            | INFO     : Indexer: Checking file /home/bjd/Public/CIMG2015.JPG ... 
  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/Public/CIMG2015.JPG
  11-07-03 20:39:25 | vulcan     | Indexer              | Indexer            | INFO     : Processing request org.syncany.index.requests.CheckIndexRequest@6d172f8f
  11-07-03 20:39:25 | vulcan     | CheckIndexRequest    | Indexer            | INFO     : Indexer: Checking file /home/bjd/Public/CIMG2015.JPG ... 
  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/Public/CIMG2015.JPG
  11-07-03 20:39:25 | vulcan     | Indexer              | Indexer            | INFO     : Processing request org.syncany.index.requests.CheckIndexRequest@34ae19a
  ... <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).

To manage notifications about this bug go to:
https://bugs.launchpad.net/syncany/+bug/805210/+subscriptions


References