Ticket 47712 - betxn: retro changelog broken after cancelled transaction
Bug Description: If a transaction is aborted (eg failing automember) and
the retrocl is either broken (first txn after enabling rcl)
or there are gaps in the changenumbers
The reason that there are gaps in changenumbers is that
if the txn is undone the entry is removed from the
RCL database, but the last changnumer was incremented already
The reason that the RCL seems to be broken is that
the entry is removed from the database, but is still in
the entry cache. For the first change the changenumber is
always recreated and it detects the entry in the entrycache
and returns "already exists". If the gaps would be avoided
this would also happen for later failures.
Fix Description: If the RCL postop function is called with an error set in the
pblock, set a flag that next time a chnagenumber will be
assigned it is recreated from the database.
It is not possible to remove the CL entry from the entry cache
from the RCL plugin, cache functions are not available.
The only solution is to avoid keeing RCL entries in the
entry cache after their initial creation. Extend the
operation flags to trigger a removal from cache in
Reviewed by: richm, thanks