January 2019
Intermediate to advanced
606 pages
15h 1m
English
In the previous librados application example, an object was created on the Ceph cluster and then the object's attributes were added. In most cases, this two-stage operation may be fine, however, some applications might require that the creation of the object and its attributes are atomic. That is to say, that if there was an interruption of service, the object should only exist if it has all its attributes set, otherwise the Ceph cluster should roll back the transaction. The following example, written in C++, shows how to use librados atomic operations to ensure transaction consistency across multiple operations. The example will write an object and then prompt the user if they wish ...