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

FISH-659: Fault Tolerance 3.0 full pass #5066

Merged
merged 6 commits into from
Dec 22, 2020
Merged

Conversation

pdudits
Copy link
Contributor

@pdudits pdudits commented Dec 21, 2020

Description

Small refactorings in Fault Tolerance implementation to make all TCK test pass.

The core change was to return back to standard managed thread pools. These pools propagate application context correctly so the issue with having incorrect application name on invocation stack no longer applies.

However the need for application name was greatly reduced in next optimization, where actual class and method reference are used as keys into state map, further stabilizing the tests.

Also discovered and fixed is memory leak in FaultTolerancePolicy's cache where entires were not deleted upon undeployment, which was troublesome especially for run of TCK. With these two changes together in became apparent that cleanup of method data can be removed, as data has relatively small footprint and keeping them removes confusion on what state of the system is.

Important Info

Testing

New tests

Full FT 3.0 TCK passes:

payara/MicroProfile-TCK-Runners#133

Testing Environment

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Java version: 1.8.0_275, vendor: Azul Systems, Inc.
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Documentation

Documentation will require update, as all threadpool and cleanup related parameters are not applied anymore.

Notes for Reviewers

/cc @jbee, if you have bit of time, check if I didn't misunderstood any of the original intentions of the code.

Managed executor retain invocation context upon submission, fixing the problem
of interceptor getting fresh state because invocation manager returned wrong
application name
Resulted in "No free work or queue space" when CAS would fail just 5 times.
Fix NPE in FaultToleranceInvocation.toString.
Determining app name and composing String methodId unnecessarily slows down.

App name is determined once per method context now.

FT data are now deleted upon undeployment by matching classes' classloaders
against undeployed app's classloader.

Expiration of the cache was removed, removing need for target object and expiration checks.

FaultToleranceServiceStub introduces StubContext as encapsulation of MethodKey which would
otherwise need to be public.
@pdudits pdudits requested a review from MattGill98 December 21, 2020 18:51
Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a pair of fresh eyes is what that needed.
Good work @pdudits !

@MattGill98
Copy link
Contributor

jenkins test please

1 similar comment
@MattGill98
Copy link
Contributor

jenkins test please

Looking them up via logical name triggers the activator which
would create them in domain config if they are not materialized in domain.xml
yet
@pdudits
Copy link
Contributor Author

pdudits commented Dec 22, 2020

jenkins test please

@MattGill98 MattGill98 merged commit 6be0836 into payara:master Dec 22, 2020
JamesHillyard pushed a commit to JamesHillyard/Payara that referenced this pull request Sep 17, 2021
FISH-659: Fault Tolerance 3.0 full pass
JamesHillyard pushed a commit to JamesHillyard/Payara that referenced this pull request Sep 17, 2021
FISH-659: Fault Tolerance 3.0 full pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants