Fix concurrent transactions on the same connection - #77
Conversation
f5768dc to
aa1bf52
Compare
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
31537dd to
da9a5cd
Compare
There was a problem hiding this comment.
5 issues found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="databasez/core/transaction.py">
<violation number="1" location="databasez/core/transaction.py:130">
P2: When an outer transaction waits for a long-lived inner transaction, this zero-duration polling loop consumes CPU for the entire wait. Wait on the transaction condition and notify all finalization waiters when the stack changes, or use a positive bounded polling interval.</violation>
<violation number="2" location="databasez/core/transaction.py:415">
P2: Adding keyword-only markers to the public transaction controls breaks callers that pass the existing timeout argument positionally. Preserve the positional signatures, or introduce this API change deliberately with a compatibility plan.</violation>
</file>
<file name="databasez/core/connection.py">
<violation number="1" location="databasez/core/connection.py:76">
P2: When a full-isolation connection is re-entered during the previous isolation thread's shutdown, this guard raises instead of waiting for the running thread lock. The existing `with _connection_thread_running_lock` already serializes startup; remove the pre-check or retry startup after the old thread releases the lock.</violation>
<violation number="2" location="databasez/core/connection.py:437">
P2: The new keyword-only separator breaks existing callers that pass `timeout` positionally on a `Connection`. Preserve positional compatibility while still extracting positional timeouts for multiloop proxying, or provide a compatibility signature before making this parameter keyword-only.</violation>
</file>
<file name="databasez/core/database.py">
<violation number="1" location="databasez/core/database.py:789">
P2: Existing callers that pass the optional timeout positionally, such as `database.connection(5)` or `await database.fetch_all(query, values, 5)`, now fail with `TypeError` before executing. Preserve the existing positional-compatible signatures or add a compatibility path for positional `timeout`.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
f2edebb to
a52f99c
Compare
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Changes: