Hi, I am interested in better understanding ZFS''s transactional capabilities. With ZFS Is it possible to create or update multiple files in a single atomic transaction? If so, does anyone have a C/Java example or test case of this? Help would be most appreciated. Much thanks, Phil Haynes This message posted from opensolaris.org
> I am interested in better understanding ZFS''s transactional capabilities. > With ZFS Is it possible to create or update multiple files in a single > atomic transaction?Internally, ZFS can indeed do this. The rename(2) system call, for example, is implemented as a link + unlink + ctime update. We don''t yet have an API to access this capability from userland, but we''re planning to develop one because it can be incredibly useful. It allows you to do things that are either impossible or ridiculously expensive with the standard POSIX interfaces. FMI, what sort of operations would you like to be able to do atomically? Jeff
I''ve just written a non-relational database in Java and, to keep things atomic, had to use a before-image file. (Independent open source project, AgileWiki.org) Being able to request a set of random writes on a single file as an atomic operation would eliminate the need for the before-image file. The restriction then would be to cache all the dirty datablocks until the end of the transaction--but with today''s availablity of RAM, that doesn''t seem to be much of a restriction. And even an out-of-memory failure would still keep things atomic. :-) Bill la Forge Jeff Bonwick wrote:>>I am interested in better understanding ZFS''s transactional capabilities. >>With ZFS Is it possible to create or update multiple files in a single >>atomic transaction? >> >> > >Internally, ZFS can indeed do this. The rename(2) system call, >for example, is implemented as a link + unlink + ctime update. >We don''t yet have an API to access this capability from userland, >but we''re planning to develop one because it can be incredibly useful. >It allows you to do things that are either impossible or ridiculously >expensive with the standard POSIX interfaces. > >FMI, what sort of operations would you like to be able to do atomically? > >Jeff > >_______________________________________________ >zfs-discuss mailing list >zfs-discuss at opensolaris.org >http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20060216/54f2cde8/attachment.html>
> FMI, what sort of operations would you like to be able to do atomically?Thanks Jeff. I would like to transfer money from one account to another recording account information as a journal of XML documents. The application is a retail internet financial application in a regulated environment subject to extreme flash crowd behaviour. Rather than have the overhead of a conventional database it occurred to me that ZFS would not only avoid a whole bunch of regulative issues and costs, but in comparison to conventional databases the performance of such an approach would absolutely scream. Phil. This message posted from opensolaris.org