On 2005-01-19 Alexey Verkhovsky wrote: > I've been fiddling with MadeleineService in Instiki - it is somewhat > smarter now. > See http://dev.instiki.org/changeset/7 and > http://dev.instiki.org/changeset/22 > > Madeleine people: please tell me if I'm doing something wrong in those > changesets, especially the first one. > If not, maybe you should use that code as an example of what a real-life > thread for snapshot taking should look like? I guess that's me! :) The changesets look fine. We should probably add a method to Madeleine to allow querying about status things like that, so you aren't forced to check for files. I think Instiki's snapshot management is the most complete we've seen so far, we may even merge it into Madeleine itself. > There still one potentially big story missing - namely, a signal handler > for graceful shutdown. I expect there must be moments during > snapshot-taking when that thread is in critical state (in the sense that > killing it would result in snapshot corruption). But I haven't looked at > that aspect seriously yet. Madeleine writes snapshots into a ".snapshot.tmp"-file, forces a disk write and only after that renames it to ".snapshot". So killing it during the write won't break anything. /Anders --