[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [MirageOS-devel] basic support for transactions in irminsule
Hi all, just a quick update on irminsule. I've added last week a support of "views", which are efficient in-memory lazy cache for subtrees, without history. Reads are done only when needed and all the serialisation cost of computing SHA1 from values is done only when you commit the full view to store. There are two use-cases for such views: - you need a staging area, ie. you don't want to commit every operation on the store: you create a view for a given path, do some stuff, and when you are happy, you create one big commit in the store with the changes - you want to map a sub-tree to an OCaml value: in that case you want to be able to store the subtree in different parts of your store if needed or you don't have a specific path in mind when you create the initial view. When you want the view to be committed, you can simply replace the current sub-tree by your view using the `update_view` function. But there are use-cases where it's not exactly what you need, for instance: transactions. In that case, you want to replay all the updates on top of the HEAD version of the tree, and check that the reads returns the good result. I've just added that to Irminsule, with the 'merge_view' function. In bonus, you have all the operations done on the view which now appears in the commit message. I'm still not totally happy with the atomicity of such operations (ie. there is no guarantee than nobody else is modifying the HEAD tag when you merge a transaction, which can lead to transaction loss if not careful enough). As usual, feel free to play with the new feature and give some feedback on the mailing list or on the Github issue tracker. Best, Thomas _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |