You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pmem
Hi,
I was wondering how PMDK transactions work with functions being called within a closure? Does the entirety of the function rollback as well during a crash, including persistent memory changes that are made in the method?
Thanks!
Piotr Balcer
unread,
Apr 2, 2020, 6:14:51 AM4/2/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pmem
As long as the closure is executed in the same thread as the transaction, yes.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pmem
Thanks for getting back to me Piotr. My code currently uses the C macro instead of the C++ bindings, so I'm unsure if that makes a difference. I'm talking about something like this:
TX_BEGIN(pop) {
do_some_function(arg);
} TX_END
Does the work in do_some_function() rollback as well during a failed transaction? Does your answer apply here too?
Piotr Balcer
unread,
Apr 2, 2020, 11:40:58 AM4/2/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pmem
I misunderstood what you meant by closure. Yes, what you are asking about is true. The transaction's state is thread local.