A static final end for the two magic values (12345 and _temporary_volume) would be nice. Coming across that in the future could be confusing otherwise.
Now that tree handles are always loaded proactively, it might be nice to make JournalManage#handleForTree() private/package, grab the current handle in usages in Transaction, and assert in the various JournalManager#write* methods that the incoming handling is non-0.
I don't mean to harp, but since we are trying to fix a bug about the handle lifetime it seems preferable to check all of our assumptions related to it.
A static final end for the two magic values (12345 and _temporary_volume) would be nice. Coming across that in the future could be confusing otherwise.
Now that tree handles are always loaded proactively, it might be nice to make JournalManage# handleForTree( ) private/package, grab the current handle in usages in Transaction, and assert in the various JournalManager# write* methods that the incoming handling is non-0.
I don't mean to harp, but since we are trying to fix a bug about the handle lifetime it seems preferable to check all of our assumptions related to it.