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

[WFLY-10351] BMT interceptor timeout reset adjustment #12225

Conversation

@ochaloup
Copy link
Contributor

ochaloup commented Apr 12, 2019

https://issues.jboss.org/browse/WFLY-10351

Adding correct transaction timeout handling for propagate the reset of the timeout to the WFTC and not to Narayana. Adding tests on fact that the method setTransactionTimeout() sets the timeout value for thread being active.

@dmlloyd would you be so kind and check if this follows the rationale the issue was created with and how the WFLY-10146 was treated. Thanks.

@ochaloup ochaloup changed the title [WFLY-10351] BMT interceptor cleanup [WFLY-10351] BMT interceptor timeout reset adjustment Apr 12, 2019
@@ -60,7 +59,7 @@ public Object processInvocation(final InterceptorContext context) throws Excepti
if (oldTx != null) tm.resume(oldTx);
}
} finally {
tm.setTransactionTimeout(oldTimeout == -1 ? 0 : oldTimeout);
tm.setTransactionTimeout(oldTimeout == ContextTransactionManager.getGlobalDefaultTransactionTimeout() ? 0 : oldTimeout);

This comment has been minimized.

Copy link
@bstansberry

bstansberry Apr 13, 2019

Contributor

The WFLY-10146 change included the following comment before this line, which I'd like to see here as well as it helps clarify what's otherwise pretty confusing:

// See also https://issues.jboss.org/browse/WFTC-44

The part of the WFLY-10146 change adding that comment:

https://github.com/wildfly/wildfly/pull/11086/files#diff-e05009bda935bba48b4ee7ca633ba1ecR170

The rest of the changes in this class all LGTM; they are just changing to standard ContextTransactionManager use. I think this line seems fine too (other than needing the comment) but checking with David or @chengfang or @tadamski makes sense.

This comment has been minimized.

Copy link
@dmlloyd

dmlloyd Apr 13, 2019

Member

I agree with Brian, adding the comment would be a good idea. Otherwise IIRC this seems correct.

This comment has been minimized.

Copy link
@kabir

kabir Apr 16, 2019

Contributor

@ochaloup Please re-add the comment :)

This comment has been minimized.

Copy link
@ochaloup

ochaloup Apr 17, 2019

Author Contributor

@kabir just I'm now not sure if you refer to something more which is missing.
I added the comment // See also https://issues.jboss.org/browse/WFTC-44 above the change of the tm.setTransactionTimeout(...). I can see the change is still at the place if I take a look to the PR "Files changes". Could be that only the github does not show this as "outdated" as I did not do any change on the highlighted line but above it.

This comment has been minimized.

Copy link
@kabir

kabir Apr 17, 2019

Contributor

@ochaloup sorry, you are right

adding tests for timeout issue the XAResource setTransactionTimeout:
Once set, this timeout value is effective until setTransactionTimeout
is invoked again with a different value.
@ochaloup ochaloup force-pushed the ochaloup:WFLY-10351-btm-interceptor-cleanup-timeout-issue branch from 1c53066 to 098376c Apr 15, 2019
@ochaloup

This comment has been minimized.

Copy link
Contributor Author

ochaloup commented Apr 15, 2019

@bstansberry @dmlloyd thanks. I added the comment // See also https://issues.jboss.org/browse/WFTC-44 as proposed.

@wildfly-ci wildfly-ci added the deps-ok label Apr 15, 2019
@kabir kabir merged commit c3e8825 into wildfly:master Apr 17, 2019
6 of 7 checks passed
6 of 7 checks passed
Linux - elytron - JDK 8 (Pull Request) - merge TeamCity build failed
Details
Dependency Tree (Pull Request) - merge TeamCity build finished
Details
Linux - JDK 11 (Pull Request) - merge TeamCity build finished
Details
Linux - JDK 8 Finished TeamCity Build WildFly / Pull Request / Linux - JDK 8 : Tests passed: 4857, ignored: 134
Details
Linux with security manager - JDK 8 Finished TeamCity Build WildFly / Pull Request / Linux SM - JDK 8 : Tests passed: 4513, ignored: 152
Details
Windows - JDK 11 Finished TeamCity Build WildFly / Pull Request / Windows - JDK 11 : Tests passed: 4848, ignored: 141
Details
Windows - JDK 8 Finished TeamCity Build WildFly / Pull Request / Windows - JDK 8 : Tests passed: 4850, ignored: 139
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.