From: boris Date: 2002-01-19T08:52:46+09:00 Subject: Re: [RCR] #59 Add fsync method to IO class On Sat, Jan 19, 2002 at 03:15:23AM +0900, Yukihiro Matsumoto muttered... : Hi, : : In message "Re: [RCR] #59 Add fsync method to IO class" : on 02/01/19, Eric Lee Green writes: : : |> * how common are they? : | : |Extremely common in any database system. : : OK, fine. : : |> * what if it's not defined on the platform? : | : |Then it's a NOP, and transactional stuff won't work reliably (shrug). : |Which is no different from the current situation. : : We have to make up consensus about fdatasync. Choose one: : : (1) fsync and fdatasync; NOP if not exist : (2) fsync and fdatasync; error if not exist : (3) fsync only; NOP if not exist : (4) fsync only; error if not exist : (5) we don't need both : : I won't vote for 5; maybe I'm going to vote for 4. : matz. : Personally I would go for 2 - that way you can write it to use them, and have some sort of error recovery if it doesn't work [you'll have that anyway]. On platforms that only support the one, eg. fsync - you could just make fdatasync a call through to that. But I would say that if there is no support for the syncing and error must be thrown (otherwise people will assume it worked). Regards, Chris -- Chris Ross (boris) [ chris@darkrock.co.uk, http://www.darkrock.co.uk ] [ (chris|boris)@ferite.org, http://www.ferite.org ] "How many consultants will fit onto the head of a pin?"