You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible for the AsyncSQLConnectionImpl class to commit dirty data on close. Most connection pool connection proxies detect if there are uncommitted statements (eg dirty state) when close is called on the connection and rollback those statements before returning the connection to the pool. AsyncSQLConnectionImpl takes the opposite approach and commits the dirty state before returning the connection to the pool.
In a reactive-streams context, a subscriber can abruptly dispose of a subscription without completion or error notifications occurring. To prevent resource leakage, such as database connection leaks, it is common to perform resource cleanup in doFinally since it will always be called when a stream is terminated whether that is due to completion, error, or disposal. If close is called in doFinally then a transaction might get committed even though not all the participating statements have executed.
To fix this, if dirty state is detected when close is called, rollback should be executed on the connection instead of commit
The text was updated successfully, but these errors were encountered:
It is possible for the AsyncSQLConnectionImpl class to commit dirty data on close. Most connection pool connection proxies detect if there are uncommitted statements (eg dirty state) when close is called on the connection and rollback those statements before returning the connection to the pool. AsyncSQLConnectionImpl takes the opposite approach and commits the dirty state before returning the connection to the pool.
In a reactive-streams context, a subscriber can abruptly dispose of a subscription without completion or error notifications occurring. To prevent resource leakage, such as database connection leaks, it is common to perform resource cleanup in doFinally since it will always be called when a stream is terminated whether that is due to completion, error, or disposal. If close is called in doFinally then a transaction might get committed even though not all the participating statements have executed.
To fix this, if dirty state is detected when close is called, rollback should be executed on the connection instead of commit
The text was updated successfully, but these errors were encountered: