Skip to content

Commit 6dee28b

Browse files
committed
# 831 jdp-2024-10: Allow disabling async fetch
1 parent 5a780db commit 6dee28b

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
== Status
44

55
* Published: 2023-07-04
6-
* Updated: 2023-07-05
6+
* Updated: 2024-12-20
77
* Implemented in: Jaybird 6
8+
* Updated by: https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2024-10-allow-disabling-async-fetch.adoc[jdp-2024-10]
89

910
== Type
1011

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
= jdp-2024-10: Allow disabling async fetch
2+
3+
== Status
4+
5+
* Draft
6+
* Proposed for: Jaybird 6
7+
* Updates: https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc[jdp-2023-12]
8+
9+
== Type
10+
11+
* Feature-Specification
12+
13+
== Context
14+
15+
In https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc[jdp-2023-12], https://github.com/FirebirdSQL/jaybird/issues/755[#755], we introduced asynchronous fetching for pure Java connections.
16+
17+
With every change, there is a risk we break something.
18+
To aid troubleshooting and be able to provide a workaround if we did break something, we should add a connection property which can be used to disable async fetching.
19+
20+
== Decision
21+
22+
Jaybird will add a connection property and a system property to disable async fetching by pure Java connections.
23+
24+
The Boolean connection property is called `asyncFetch`, with a default value of `true` (overridable with the system property, see below).
25+
When set to `false` (or anything not case-insensitively equal to `true`, or empty string), Jaybird will not perform async fetching in the pue Java implementation.
26+
27+
The Boolean system property is called `org.firebirdsql.jdbc.defaultAsyncFetch` with the same values, and controls the global default.
28+
It will be dynamically checked when the connection configuration is created.
29+
30+
== Consequences
31+
32+
When a connection is created with `asyncFetch=false` (whether explicitly set, or set using the system property), a pure Java connection will not perform async fetching.
33+
34+
This property does not control async fetching performed by native connections, as there is no way to configure this behaviour.

0 commit comments

Comments
 (0)