Repository navigation
Conversation
…ll returns (sijms#793) When the context of an ExecContext with array binds ended while the statement waited on a row lock, the call never returned on Oracle 19c and 23ai. After the client's break and reset, the server sends a second reset marker and holds the call's response until that reset is answered too. processMarker read one packet and returned, so the client and the server waited on each other. After a break sent by the client, processMarker now answers each reset marker with a reset until a data packet arrives (at most 8). A marker exchange the server starts on its own, for an error, is handled as before. Added TestCancelArrayDMLWaitingOnRowLock to v2/module_test and v3/module_test. Fixes sijms#793
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #793
Problem
When the context of an
ExecContextwith array binds ends while the statement waits on a row lock, the call never returns on Oracle 19c and 23ai. After the client's break and reset, the server sends a second reset marker and holds the call's response until that reset is answered too.processMarkersent one reset and read one packet, so the client and the server waited on each other. The trace is in #793.Fix
IsBreak()),processMarkeranswers each reset marker with a reset until a data packet arrives, at most 8 times.sendReset, so every reset does the same thing.Tests
TestCancelArrayDMLWaitingOnRowLockinv2/module_testandv3/module_test(needsORACLE_DSN, skipped without it): one session holds a row lock, a second runs aMERGEwith array binds under a 3 s context timeout, and the test fails if the call has not returned 60 s later.masterSame results for
v2andv3. With this PR the call returnsORA-01013inv2andcontext deadline exceededinv3, as it already does with scalar binds.Also checked on 19.18 and 23.26.1, with the same results as on
master: a server error (ORA-00942, ORA-20001) followed by another statement on the same connection, a deadlock (ORA-00060) with array binds, and a cancelled scalarUPDATEfollowed by reuse of the pool. The existing tests inmodule_testandnetworkgive the same results as onmaster(TestDataType_Int,TestDataType_Money,TestDataType_RealandTestDataType_RealNonFractionfail on both).