Skip to content

Conversation

@boskoop
Copy link
Contributor

@boskoop boskoop commented Aug 23, 2024

HHH-18513: Session Metrics for pre-partial-flushes are wrong

StatisticalLoggingSessionEventListener was incorrectly calculating the pre-partial-flush duration (probably due to a variable typo that passed review in commit e4e26ee).


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@boskoop
Copy link
Contributor Author

boskoop commented Aug 23, 2024

It seems that there was an error in the database setup for the oracle test. The tests fail with a "cannot connect to database" error (which also seems unrelated to the proposed change):

SessionFactoryTesting > initializationError FAILED
    org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Error calling Driver.connect() [ORA-12514: Cannot connect to database. Service freepdb1 is not registered with the listener at host localhost port 1521.

There was also an error during the "Start database" task:

SQL> ALTER DATABASE OPEN
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 386
Session ID: 162 Serial number: 21621
Help: https://docs.oracle.com/error-help/db/ora-03113/


Elapsed: 00:00:00.86
SQL> SQL> SQL> ERROR:
ORA-03114: not connected to ORACLE
Help: https://docs.oracle.com/error-help/db/ora-03114/

Is this a temporary/flaky error in the oracle database setup? If so, could you please retry the build job? Apparently, I don't have the rights to do so.

@dreab8
Copy link
Member

dreab8 commented Sep 4, 2024

Thanks @boskoop ,

apart the couple of comments on the test the PR looks good to me.

- remove checks for count values
- improve failure message for number of logged lines
@boskoop
Copy link
Contributor Author

boskoop commented Sep 30, 2024

@dreab8 sorry for the delay as I have been on vacation for a bit.. Could you please check again? I tried to improve the PR based on your feedback.

@dreab8
Copy link
Member

dreab8 commented Oct 3, 2024

Thanks @boskoop

assertThat( sumDuration ).isLessThanOrEqualTo( sessionNanoDuration );
}

private SessionMetric extractMetric(String logMessage, String regex) {

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note test

Potential uncaught 'java.lang.NumberFormatException'.
assertThat( sumDuration ).isLessThanOrEqualTo( sessionNanoDuration );
}

private SessionMetric extractMetric(String logMessage, String regex) {

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note test

Potential uncaught 'java.lang.NumberFormatException'.
@dreab8
Copy link
Member

dreab8 commented Oct 3, 2024

squashed in on commit and applied manually.

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.

2 participants