Hello everyone,
I would like to ask one question regarding libpmemobj internals. I am investigating its logging system.
I have understood the way the undo/redo logs are being constructed and when each one of these is applied.
My question has to do with the deletion/invalidation of these logs.
From my point of understanding, the redo long is no longer needed when it has been published.
Therefore, in operation_process_persistent_redo function, the last step is to clobber the first entry by filling it with zeros apart from the next field.
Then, in the operation_finish function, the ulog_free_next function is called to zero out the checksum of each saved redo log header in order to invalidate it.
Almost the same applies for the undo log apart from the fact that the generation number is incremented in the header in ulog_clobber_data to invalidate the log.
After this step, the ulog_free_next is called once again to invalidate the rest of the connected logs.
The valid undo logs are also being freed during the recovery in the operation_finish function that is called for each one anyway.
I would like to ask you, in case of a crash during the ulog_free_next execution for the redo log,
will this interrupted action take place on recovery or we do not really care to actually free the "next" redo
logs as their space will be reused afterwards no matter what we do?
Correct me if I have misunderstood any of the aforementioned steps.
Thank you a lot for your help.
I am looking forward to your reply.
Kind regards,
Dimitris