Skip to content

Commit ad8fadd

Browse files
Optimization: the connect descriptor sent to the database does not
include the RETRY_DELAY parameter unless the RETRY_COUNT parameter is also specified.
1 parent 6989c1f commit ad8fadd

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ Thin Mode Changes
4040
#) Error ``DPY-3001: bequeath is only supported in python-oracledb thick
4141
mode`` is now raised when attempting to connect to the database without a
4242
connect string.
43+
#) Optimization: the connect descriptor sent to the database does not include
44+
the RETRY_DELAY parameter unless the RETRY_COUNT parameter is also
45+
specified.
4346
#) Internal change: improve low-level encoding and decoding routines.
4447
#) Internal change: send buffer length for bind variables without unneeded
4548
adjustment.

src/oracledb/impl/base/connect_params.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,8 @@ cdef class Description(ConnectParamsNode):
785785
parts.append("(SOURCE_ROUTE=ON)")
786786
if self.retry_count != 0:
787787
parts.append(f"(RETRY_COUNT={self.retry_count})")
788-
if self.retry_delay != 0:
789-
parts.append(f"(RETRY_DELAY={self.retry_delay})")
788+
if self.retry_delay != 0:
789+
parts.append(f"(RETRY_DELAY={self.retry_delay})")
790790
if self.expire_time != 0:
791791
parts.append(f"(EXPIRE_TIME={self.expire_time})")
792792
if self.tcp_connect_timeout != DEFAULT_TCP_CONNECT_TIMEOUT:

tests/test_4500_connect_params.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,8 +898,7 @@ def test_4549(self):
898898
self.assertEqual(params.port, [1521, 4549, 4549, 1521])
899899
self.assertEqual(params.service_name, "service_name_4549")
900900
expected_conn_string = (
901-
"(DESCRIPTION=(RETRY_DELAY=1)"
902-
"(ADDRESS=(PROTOCOL=tcp)(HOST=host4549a)(PORT=1521))"
901+
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host4549a)(PORT=1521))"
903902
"(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=host4549b)(PORT=4549))"
904903
"(ADDRESS=(PROTOCOL=tcp)(HOST=host4549c)(PORT=4549)))"
905904
"(ADDRESS=(PROTOCOL=tcp)(HOST=host4549d)(PORT=1521))"

0 commit comments

Comments
 (0)