On 5-Dec-09, at 9:32 PM, nxyyt wrote:

The "rename trick" may not work here. Even if I renamed the file successfully, the data of the file may still reside in the memory instead of flushing back to the disk. If I made any mistake here, please correct me. Thank you!

I'll try to find out whether ZFS binding the same file always to the same opening transaction group. If so, I guess my assumption here would be true. Seems like there is only one opening transaction group at anytime. Can anybody give me a definitive answer here?

For ZIL, it must be flushed back to disk in the order of fsync(). So that the last append of the file would happen as the last transaction log in ZIL for this file, I think. The assumption should still be true.

fsync or fdatasync may be too heavyweight for my case because it's a write intensive workload.

That's the point, isn't it? :)

I hope replicating the data to different machines to protect the data from power outage would be better.

This is the Durability referred to in "ACID". This is a very well studied problem, I suggest you look at the literature and architecture surrounding transactional databases, if you find that tackling this through a POSIX filesystem is problematic.

--Toby

--
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to