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
Copy file name to clipboardExpand all lines: devdoc/jdp/jdp-2026-02-cancellation-thread-safety-backport.adoc
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@
6
6
7
7
== Status
8
8
9
-
* Draft
10
-
* Proposed for: Jaybird 5.0.11, Jaybird 6.0.4
9
+
* Published: 2026-01-10
10
+
* Implemented in: Jaybird 5.0.11, Jaybird 6.0.4
11
11
12
12
== Type
13
13
@@ -31,8 +31,11 @@ However, we will only make changes so cancellation is threadsafe with regard to
31
31
32
32
* Use `withTransmitLock`
33
33
** within `FbWireStatement` implementations
34
+
** within `FbWireTransaction` implementations
35
+
+
36
+
Given the likelihood of commit after a statement operation in auto-commit, thread-safety of commit/rollback with regard to cancellation turned out to be needed during testing.
34
37
** with the `writeDirect` method used by cancellation
35
-
** with sync operations for deferred operations
38
+
** with sync operations for deferred operations (Jaybird 6 only)
36
39
* As much as possible, avoid changing method signatures, method visibility, and removing or renaming methods
37
40
38
41
== Consequences
@@ -44,6 +47,8 @@ Given this backport does not cover the entire wire protocol, thread-safety of ca
44
47
Implementers of Jaybird forks or alternative wire protocol versions building on classes in `org.firebirdsql.gds.ng.wire` package and "`sub`"-packages will need to change their code to correctly obtain the transmit lock during transmission to the server for statement operations.
45
48
Given this backport is less invasive compared to the changes in Jaybird 7, there is some risk of "`missing`" necessary changes.
46
49
50
+
Contrary to the implementation in Jaybird 7, the implementation in Jaybird 5 and 6 does rely on the reentrancy of the lock.
51
+
47
52
It is possible that this change will not fully address cancellation issues.
48
53
We suspect deferred response handling might need additional work, and result sets may need to be invalidated/closed by cancellation.
49
54
This will be subject to further investigation after this thread-safety issue has been addressed.
0 commit comments