Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DISCONNECT with POST_TRANSACTION over KILL #4228

Closed

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Aug 25, 2020

Q A
Type bug
BC Break no
Fixed issues #4225

Summary

The Oracle docs say the following:

The POST_TRANSACTION clause waits for ongoing transactions to complete
before disconnecting the session, while the IMMEDIATE clause disconnects
the session and ongoing transactions are rolled back immediately.

See https://oracle-base.com/articles/misc/killing-oracle-sessions

@greg0ire greg0ire linked an issue Aug 25, 2020 that may be closed by this pull request
@greg0ire greg0ire added the Bug label Aug 25, 2020
@greg0ire greg0ire marked this pull request as draft August 25, 2020 19:10
@greg0ire
Copy link
Member Author

greg0ire commented Aug 25, 2020

I tried to remove the IMMEDIATE keyword at first, it's not enough 😞 , after reading the docs, I'm under the impression that the confirmation we obtain is a confirmation of the session being marked for a kill:

The KILL SESSION command doesn't actually kill the session. It merely asks the session to kill itself. In some situations, like > waiting for a reply from a remote database or rolling back transactions, the session will not kill itself immediately and will wait > for the current operation to complete. In these cases the session will have a status of "marked for kill". It will then be killed as > soon as possible.

The Oracle docs say the following:
> The POST_TRANSACTION clause waits for ongoing transactions to complete
> before disconnecting the session, while the IMMEDIATE clause disconnects
> the session and ongoing transactions are rolled back immediately.

See https://oracle-base.com/articles/misc/killing-oracle-sessions
@greg0ire greg0ire force-pushed the fix-sporadic-oracle-failures branch from 8d43e45 to c84494c Compare August 25, 2020 19:25
@greg0ire greg0ire changed the title Confirm kill before dropping database Use DISCONNECT with POST_TRANSACTION over KILL Aug 25, 2020
@greg0ire
Copy link
Member Author

greg0ire commented Aug 25, 2020

Yay it worked 1 time!
I will restart the GH jobs and update the above counter

@greg0ire
Copy link
Member Author

greg0ire commented Aug 25, 2020

Argh it failed again 😞
I'm out of ideas…

@morozov
Copy link
Member

morozov commented Aug 26, 2020

I'm out of ideas…

This code will be removed in 3.0.x based on the deprecation in #4230. I don't see much point in fixing what's broken by design.

@greg0ire greg0ire closed this Aug 26, 2020
@greg0ire greg0ire deleted the fix-sporadic-oracle-failures branch August 26, 2020 17:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sporadic test failure on PDO_OCI
2 participants