Up to now, logging of transaction was implemented as a transaction filter, a class that derives from FdbDatabaseFilter / FdbTransactionFilter and that wraps the inner transaction instance.
FdbLoggedTransaction.FooAsync(...) handles logging, and calls into inner.FooAsync(...). This methods needs to call another operation Bar(...) that is also overloaded by the filter. In this case, the inner Bar will be called instead of the outer version. In this scenario, the "Bar" operation will not be logged. If the application code called Bar directly, it would have been logged.
This is a major issue with filters that cannot be fixed without reworking everything, so the intent is to scrapped the current implementation, and only keep the logging feature (heavily used) back inside the main transaction implementation.
This PR removes the filter infrastructure, and merge the logging code inside FdbTransaction, which will manage the FdbTransactionLog instance.
In the future, if we find a better way to do filters, we may move this outside the class again.
Up to now, logging of transaction was implemented as a transaction filter, a class that derives from FdbDatabaseFilter / FdbTransactionFilter and that wraps the inner transaction instance.
FdbLoggedTransaction.FooAsync(...)
handles logging, and calls intoinner.FooAsync(...)
. This methods needs to call another operationBar(...)
that is also overloaded by the filter. In this case, the innerBar
will be called instead of the outer version. In this scenario, the "Bar" operation will not be logged. If the application code calledBar
directly, it would have been logged.This is a major issue with filters that cannot be fixed without reworking everything, so the intent is to scrapped the current implementation, and only keep the logging feature (heavily used) back inside the main transaction implementation.
This PR removes the filter infrastructure, and merge the logging code inside
FdbTransaction
, which will manage theFdbTransactionLog
instance.In the future, if we find a better way to do filters, we may move this outside the class again.