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
Describe the Bug
After upgrading to [email protected] from 1.1.1, database queries executed within a transaction block now fail with the following error: django.db.utils.InternalError: current transaction is aborted, commands ignored until end of transaction block
It appears the query is being executed twice, and the original exception is not correctly propagated to the application. This behavior may not be limited to transactional queries but could affect all queries where exceptions (e.g., from Django or psycopg) are raised. Double execution in these cases may lead to significant side effects, such as unintended data changes or corrupted transactions.
The issue seems to stem from changes introduced in this commit, where exceptions are wrapped and handled differently.
To Reproduce
Steps to reproduce the behavior:
Execute a database query within a transaction block.
Observe the error that occurs during the execution.
Expected behavior
Exceptions raised during query execution should propagate correctly, without re-executing the query or affecting the transaction state. The behavior should remain consistent with [email protected] as no breaking change announcement/changelog has been found.
Desktop (please complete the following information):
Python: 3.12
autodynatrace: 2.1.0
Django 4.2.16
psycopg2-binary: 2.9.10
The text was updated successfully, but these errors were encountered:
I have opened a PR to address this issue by separating the handling of SDK function exceptions from wrapped function exceptions. The fix ensures proper propagation while maintaining the intended instrumentation behavior.
Alternatively, the issue could be resolved by raising the original exception and not calling the wrapped function twice. However, I don't know the author's intentions and the background of the changes. Feedback on either approach is appreciated.
Describe the Bug
After upgrading to
[email protected]
from1.1.1
, database queries executed within a transaction block now fail with the following error:django.db.utils.InternalError: current transaction is aborted, commands ignored until end of transaction block
It appears the query is being executed twice, and the original exception is not correctly propagated to the application. This behavior may not be limited to transactional queries but could affect all queries where exceptions (e.g., from Django or psycopg) are raised. Double execution in these cases may lead to significant side effects, such as unintended data changes or corrupted transactions.
The issue seems to stem from changes introduced in this commit, where exceptions are wrapped and handled differently.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Exceptions raised during query execution should propagate correctly, without re-executing the query or affecting the transaction state. The behavior should remain consistent with
[email protected]
as no breaking change announcement/changelog has been found.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: