-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Narayana] Make all Record class and BeanPopulator to init at runtime #40310
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
@gastaldi it needs to backport to |
d999ea3
to
27b80df
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.
I agree that the properties and classes need to be initialised at runtime. Thanks for the PR.
@@ -156,6 +170,11 @@ public void setProperties(NarayanaJtaRecorder recorder) { | |||
defaultProperties.remove(i); | |||
} | |||
recorder.setDefaultProperties(defaultProperties); | |||
// This must be done before setNodeName as the code in setNodeName will create a TSM based on the value of this property |
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.
Remark: this code hasn't actually been added to the PR, it was already present and it's a quirk of github that it's showing up as added code.
The |
This comment has been minimized.
This comment has been minimized.
27b80df
to
4b14a90
Compare
@mmusgrov these three classes CAN NOT be added to initlize at runtime currently. runtimeInit.produce(new RuntimeInitializedClassBuildItem(UserTransactionImple.class.getName()));
runtimeInit.produce(new RuntimeInitializedClassBuildItem(TransactionManagerImple.class.getName()));
runtimeInit.produce(new RuntimeInitializedClassBuildItem(BaseTransaction.class.getName())); It looks like |
This comment has been minimized.
This comment has been minimized.
@gastaldi I think the reflection increase is expected. |
@zhfeng that's a lot of increase for a lot of applications so we need a certainty here. I'm not entirely sure why we end up increasing this so much. Maybe @zakkak can help us understand what's going on. BTW, I would rather have the revert in a separate PR so that we revert right away. I don't want us to take the risk of having this patch released somehow. |
4b14a90
to
de2dbb2
Compare
Thanks @gsmet - I seperate revert commit in |
Status for workflow
|
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
✖ | Native Tests - Data5 | Build |
Failures | Logs | Raw logs | 🔍 |
✖ | Native Tests - Main | Build |
Failures | Logs | Raw logs | 🔍 |
Full information is available in the Build summary check run.
You can consult the Develocity build scans.
Failures
⚙️ Native Tests - Data5 #
- Failing: integration-tests/jpa-postgresql integration-tests/jpa-postgresql-withxml
📦 integration-tests/jpa-postgresql
✖ io.quarkus.it.jpa.postgresql.ImageMetricsITCase.verifyImageMetrics
line 16
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (2 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [4367 +- 3%] but was 4663 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [201 +- 3%] but was 338 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
📦 integration-tests/jpa-postgresql-withxml
✖ io.quarkus.it.jpa.postgresql.ImageMetricsITCase.verifyImageMetrics
line 15
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (2 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [4551 +- 3%] but was 4845 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [170 +- 3%] but was 307 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
⚙️ Native Tests - Main #
- Failing: integration-tests/main
📦 integration-tests/main
✖ io.quarkus.it.main.ImageMetricsITCase.verifyImageMetrics
line 15
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (1 failure)
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [496 +- 3%] but was 633 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:46)
Flaky tests - Develocity
⚙️ JVM Tests - JDK 17 Windows
📦 integration-tests/grpc-hibernate
✖ com.example.grpc.hibernate.BlockingRawTest.shouldAdd
- History
Condition with Lambda expression in com.example.grpc.hibernate.BlockingRawTestBase was not fulfilled within 30 seconds.
-org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in com.example.grpc.hibernate.BlockingRawTestBase was not fulfilled within 30 seconds.
at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:975)
at com.example.grpc.hibernate.BlockingRawTestBase.shouldAdd(BlockingRawTestBase.java:59)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
We will discuss the merit of this PR later. For now we plan to fix the immediate issue with #40365 |
Is this PR still necessary? |
I don't think so but we need @zhfeng to decide. |
For fixing #39283 , it is not needed. But if we still want to support system properties in the native mode, it is necessary. |
I don't see anything special going on. Registering more classes for reflection is expected to increase these metrics.
With a quick count over the rest of the classes as well I get a total of 192 methods being added for reflection (which were not being added before). Assuming that even before this PR the registered methods were close to the threshold if I subtract 192 from the reported numbers I see that the result is below the 3% threshold. |
revert #40250
cc @mmusgrov