From 6dee28b6e72af376118e486fc95e29e65a20447c Mon Sep 17 00:00:00 2001 From: Mark Rotteveel Date: Fri, 20 Dec 2024 12:46:08 +0100 Subject: [PATCH] # 831 jdp-2024-10: Allow disabling async fetch --- ...023-12-async-fetching-result-set-rows.adoc | 3 +- ...p-2024-10-allow-disabling-async-fetch.adoc | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 devdoc/jdp/jdp-2024-10-allow-disabling-async-fetch.adoc diff --git a/devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc b/devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc index d3f843a69..560694f7e 100644 --- a/devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc +++ b/devdoc/jdp/jdp-2023-12-async-fetching-result-set-rows.adoc @@ -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 diff --git a/devdoc/jdp/jdp-2024-10-allow-disabling-async-fetch.adoc b/devdoc/jdp/jdp-2024-10-allow-disabling-async-fetch.adoc new file mode 100644 index 000000000..b6d795ccb --- /dev/null +++ b/devdoc/jdp/jdp-2024-10-allow-disabling-async-fetch.adoc @@ -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.