If a nested backend txn plugin fails, any updates it made that went into the entry cache still persist after the database transaction is aborted.
Fix Description:
In order to be sure the entry cache is not corrupted after a backend txn plugin failure we need to flush all the cache entries that were added to the cache after the parent operation was started.
To do this we record the start time the original operation, (or parent operation), and we record the time any entry is added to the cache. Then on failure we do a comparison and remove the entry from the cache if it's not in use. If it is in use we add a "invalid" state flag which triggers the entry to be removed when the cache entry is returned by the owner.
Bug Description:
If a nested backend txn plugin fails, any updates it made that went into the entry cache still persist after the database transaction is aborted.
Fix Description:
In order to be sure the entry cache is not corrupted after a backend txn plugin failure we need to flush all the cache entries that were added to the cache after the parent operation was started.
To do this we record the start time the original operation, (or parent operation), and we record the time any entry is added to the cache. Then on failure we do a comparison and remove the entry from the cache if it's not in use. If it is in use we add a "invalid" state flag which triggers the entry to be removed when the cache entry is returned by the owner.
https://pagure.io/389-ds-base/issue/50260
CI tested and ASAN approved.