libpmemobj - Undo Logging

22 views
Skip to first unread message

Davi Braga

unread,
Oct 15, 2019, 9:08:37 AM10/15/19
to pmem
Hi all,

I'm using libpmemobj in a scientific experiment and I'd appreciate if you folks could help me. According to this link, transactional operations are made in persistent memory through the usage of snapshots that are used later to roll back unfinished transactions. Is there any documentation that describes this process in more detail? For example, at which moment are the changes rolled back? What happens if a failure occurs during the roll back? If there is no such documentation, could you show me what are the source files related to the recovery process? 

Thanks in advance!

--

Piotr Balcer

unread,
Oct 15, 2019, 10:13:22 AM10/15/19
to pmem
Hi,
You can find the latest libpmemobj man pages here:

The part about snapshots is here:

We try to document everything about a given functionality that is relevant from the perspective
of a normal application. We intentionally avoid specifying any implementation details or
side effects in man pages, because that leaves us leeway to change the implementation.

Your application must *not* assume anything about the implementation apart from what is
documented in the provided documentation.

If you are simply curious, the core of transaction implementations is located in tx.c module:

Implementation of rolling back changes is in the `tx_abort_set` function.
The memops layer is a generic high-level abstraction for logging, it has runtime state:
For example, libpmemobj transaction uses three separate memory operation instances to run.

Diving down deeper, there's ulog, which is a low-level stateless abstraction of persistent memory logging:

In our upcoming book we have a chapter about internal implementation of libpmemobj.
Should be available (for free) relatively soon.

Piotr

W dniu wtorek, 15 października 2019 15:08:37 UTC+2 użytkownik Davi Braga napisał:
Hi all,

I'm using libpmemobj in a scientific experiment and I'd appreciate if you folks could help me. According to this link, transactional operations are made in persistent memory through the usage of snapshots that are used later to roll back unfinished transactions. Is there any documentation that describes this process in more detail? For example, at which moment are the changes rolled back? What happens if a failure occurs during the roll back? If there is no such documentation, could you show me what are the source files related to the recovery process? 

Thanks in advance!

--


Davi Braga

DEVELOPER

davi...@lsbd.ufc.br

   davi.gomes64

Reply all
Reply to author
Forward
0 new messages