-
Notifications
You must be signed in to change notification settings - Fork 591
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
Do not pool connections before checkpoint restore #29006
Do not pool connections before checkpoint restore #29006
Conversation
KyleAure
commented
Jul 9, 2024
•
edited
Loading
edited
- Reintroduce instant-on for entity manager for Jakarta data (removed Fix Jakarta Data checkpoint tests for DB Rotation #28569)
- Do not pool connections before checkpoint restore
#libby - check headers Running a personal build to verify behavior of checkpoint testing, since I cannot test this locally. |
Your personal pipeline request is at https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?uuid=1c1a2cb4-174e-468c-8117-ca674667facb Target locations of links might be accessible only to IBM employees. |
Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_Fp2UgD4mEe-Hn95lLM_tGQ Target locations of links might be accessible only to IBM employees. |
The build KyleAure-29006-20240709-1313 |
Database rotation pipeline: https://libh-proxy1.fyre.ibm.com/cognitive-dev/pipelineAnalysis.html?pipelineId=a02c738a-9f0a-4b5b-ab92-365837c8549f Target locations of links might be accessible only to IBM employees. |
fb1c1fa
to
2ca1332
Compare
#libby - check headers |
Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_LcXlAELBEe-F88sHKWQ5jw Target locations of links might be accessible only to IBM employees. |
Your personal pipeline request is at https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?uuid=bb38a1ad-e287-465a-9867-5ce8edcde188 Target locations of links might be accessible only to IBM employees. |
The build KyleAure-29006-20240715-0953 |
Database rotation pipeline: https://libh-proxy1.fyre.ibm.com/cognitive-dev/pipelineAnalysis.html?pipelineId=e0061917-7e6d-4162-b41a-f384794d11c5 Target locations of links might be accessible only to IBM employees. |
04f43c3
to
4163dfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking it stale should effectively prevent pooling. I'd be concerned about side-effects though - copying Jim @jmstephensgit for that.
Some things to consider are could it throw off stale connection counts or cause connectionErrorOccurred to be sent when there isn't anything actually stale? And, could being marked stale impact subsequent use of the connection: Transaction enlistment, sharing, whether to subsequently raise connectionErrorOccurred if the connection truly does go stale.
Probably the safest option will be to create a new boolean to indicate poolable=false, and later check this as well as stale to prevent pooling.
Could you rebase on the latest |
Do not pool connections before checkpoint restore
4163dfb
to
2761d96
Compare
@njr-11 @jmstephensgit I updated this PR with the suggestion to use a new field to flag a mcWrapper as not poolable. @tjwatson I rebased onto integration for the next personal build. |
#libby - recheck headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I added one comment for Jim to consider when he reviews it.
if (mcWrapper.shouldBeDestroyed() || mcWrapper.hasFatalErrorNotificationOccurred(fatalErrorNotificationTime) | ||
|| ((pm.agedTimeout != -1) | ||
&& (mcWrapper.hasAgedTimedOut(pm.agedTimeoutMillis)))) { | ||
if (mcWrapper.shouldBeDestroyed() || mcWrapper.hasFatalErrorNotificationOccurred(fatalErrorNotificationTime) || !mcWrapper.isPoolable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be more a question for Jim, but should the method mcWrapper.shouldBeDestroyed() also be updated to consider the poolable=false value. If so, you would not need the || !mcWrapper.isPoolable()
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isPoolable() is clear on its intended use.
If we need to optimize this area of the code under a different pull, its likely we should have a discard boolean that is set for any connections that should be discarded, but still have additional support variables that represent why its being discarded for trace and debugging. One discard boolean would clean up this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@njr-11 I looked at other places we use shouldBeDestroyed()
and it was typically used to check if their was already a connection error presented to the user. Otherwise, these debug messages are hidden. For example:
open-liberty/dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/XATransactionWrapper.java
Lines 336 to 339 in 3a3e3a2
if (!mcWrapper.shouldBeDestroyed()) { | |
mcWrapper.markTransactionError(); | |
Tr.error(tc, "XA_RESOURCE_ADAPTER_OPERATION_ID_EXCP_J2CA0027", "commit", xid, e, mcWrapper.gConfigProps.cfName); | |
} |
Which is why I decided to add a new method
Your personal pipeline request is at https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?uuid=d88c16cd-3928-4c85-8d44-147b9270f211 Target locations of links might be accessible only to IBM employees. |
Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_MhadkESaEe-ngPvsOTExmw Target locations of links might be accessible only to IBM employees. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
After talking this over more with @tjwatson it would seem this is not the correct direction to go.
So really this change is just masking the problem. |
That sounds nice for InstantOn scenario. But may cause some unexpected latency for other scenarios where we would have done this work as part of server startup? |
That is true, but the latency here is all related to the opening of the first connection. Opened an issue here: eclipse-ee4j/eclipselink#2213 |
The build KyleAure-29006-20240717-1819 |