>> You're running refile the same time as an "inc" or "pick"? > >It can happen, such as with cron jobs.
Yeah, but until (relatively) recently, that could result in corrupted sequences. I'm just trying to imagine how people could be doing that since it can break, today. >> I'm trying to see how that's not a recipe for disaster, no >> matter what :-) Well, actually, I think in the refile case >> that's one where the sequence file should be locked for >> the whole operation; if that's done, it should work out >> fine. "folder -pack" is actually one I'm unsure about >> ... but I am leaning toward having the sequence file >> locked during that whole operation as well. > >No doubt. At this point, I'm not sure what the criterion is >for deciding whether an operation needs to be locked. So I >think that all of them need to be. The criteria to me is pretty simple: - If you just need to read the sequence file, it only needs to be read-locked during open & read. - If you're going to MODIFY the sequence file (which ends up being a large number of programs, actually), it needs to be write-locked the whole time you're fiddling with it. (The technical challenge here is that seq_read() is going to have to be fiddled with so it can handle being called twice on the same folder structure). --Ken _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
