Skip to content

Commit

Permalink
# 831 jdp-2024-10: Allow disabling async fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Dec 20, 2024
1 parent 5a780db commit 6dee28b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
== Status

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

== Type

Expand Down
34 changes: 34 additions & 0 deletions devdoc/jdp/jdp-2024-10-allow-disabling-async-fetch.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
= jdp-2024-10: Allow disabling async fetch

== Status

* Draft
* Proposed for: Jaybird 6
* Updates: https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc[jdp-2023-12]

== Type

* Feature-Specification

== Context

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.

With every change, there is a risk we break something.
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.

== Decision

Jaybird will add a connection property and a system property to disable async fetching by pure Java connections.

The Boolean connection property is called `asyncFetch`, with a default value of `true` (overridable with the system property, see below).
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.

The Boolean system property is called `org.firebirdsql.jdbc.defaultAsyncFetch` with the same values, and controls the global default.
It will be dynamically checked when the connection configuration is created.

== Consequences

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.

This property does not control async fetching performed by native connections, as there is no way to configure this behaviour.

0 comments on commit 6dee28b

Please sign in to comment.