Closed quantuminternet closed 1 week ago
I can confirm the issue and will work on a solution. Thanks for reporting it!
I have pushed a patch that corrects this issue and have initated a build from which you can download pre-built development wheels once it completes. You can also build from source if you prefer.
Great, thank you!
I have tested the wheel on the system we found the issue on and I can confirm that this fixes the issue.
Database: 19.0.0.0.0 platform.platform: Linux-5.4.0-148-generic-x86_64-with-glibc2.31 sys.maxsize > 2**32: True platform.python_version: 3.12.6 oracledb.version: 2.4.1
I have not seen anything in the changelog that suggests that this has been addressed in 2.5.0
Is it an error or a hang or a crash? error
What error(s) or behavior you are seeing? We have a list of alternative IP addresses for an Oracle database. When one of them fails on connect with a timeout and retry_count is set to something greater than zero, we expect that the connection is attempted again with one of the other addresses. This works as expected in thick mode, but fails in thin mode: In thin mode, an exception is raised after the first attempt.
This gives the following result:
So it looks like sometimes it suceeds on first try, but sometimes it fails on first try and immediately raises an exception, instead of trying a second time. Since it takes 2 seconds until the exception is raised (instead of 8), we can exclude that the first IP is tried multiple times
Running the same code in thick mode gives the expected result: Sometimes it succeeds on first try, sometimes it runs into a timeout after 2 seconds, but succeeds on second try
Removing (LOAD_BALANCE=yes) results in the connection always failing after 2 seconds in thin mode and the connection always succeeding after 2 seconds in thick mode.
Putting (RETRY_COUNT=3) in the DSN or passing it directly as parameter to connect() does not seem to make a difference
The problem occurs in thin mode. If we call init_oracle_client, it works as expected