[Csync2] Time problems and inotify

Art -kwaak- van Breemen ard+csync2 at telegraafnet.nl
Thu Sep 25 13:20:48 CEST 2008


I'm no perl guru and I've got a log of different projects
screaming for attention.
I've got this running:
http://217.196.41.9/~ard/csync2id.pl
I haven't had an inotify overflow since I started it one month
ago. Only csync2 "database is locked" messages.
But the following thing must be done to ensure that it works
properly:
- a fifo mechanism between the async forking of csync2 -h
- restarting that csync2 if it returns an error
In earlier tests using inotifywait in monitor mode and using
rsync to sync a 100k files and 1k directories this technique
without the fifo will be easily overflowed.

The +:
- It will recursively watch directories.
- Dirty techniques to skip traversing directories if their link
  count==2
- If a directory is created within the watched tree, it will
  automatically be watched, and hinted with the -r option.
It's a working proof of concept. Don't build your business around
it :-).

Changes I am planning for csync2 itself:
An option to pass a limit for the queries, so it will not handle
all hints or commands in a single pass. Needed to give the
hinting and other tasks some locking air.
Configurable tmpdir option.
I've also noted there is a bug in the -m ark dirty option in
combination with %prefixsubst% . It's an option one can live
without if everything goes well, but sometimes you want to test
things or sometimes things do not go well :-).
If my head is clear enough I will take a good look at it.

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in email?


More information about the Csync2 mailing list