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

Version 4.18 and 4.17.2 taking long time in computing checksum #3655

Closed
Sumitkrchaudhary opened this issue Jan 9, 2023 · 14 comments · Fixed by #3790
Closed

Version 4.18 and 4.17.2 taking long time in computing checksum #3655

Sumitkrchaudhary opened this issue Jan 9, 2023 · 14 comments · Fixed by #3790

Comments

@Sumitkrchaudhary
Copy link

Sumitkrchaudhary commented Jan 9, 2023

Environment

Liquibase Version:
4.18
Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.>
CLI
Liquibase Extension(s) & Version:
4.18
Database Vendor & Version:
Oracle Database 19c Enterprise Edition Release 19.3.0.0.0

Operating System Type & Version:
Oracle Enterprise Linux 7
Infrastructure Type/Provider: <AWC, GCS, Azure, VM, etc>
VM

Description

Starting Liquibase at 20:06:21 (version 4.17.2 #5255 built at 2022-11-01 18:07+0000)
[2022-11-30 20:06:23] INFO [liquibase.lockservice] Successfully acquired change log lock
[2022-11-30 20:06:39] INFO [liquibase.changelog] Creating database history table with name: TEST_APP.DBCHANGELOG
[2022-11-30 20:06:39] INFO [liquibase.changelog] Reading from TEST_APP.DBCHANGELOG
Running Changeset: changelogs/prerequisite_checks.xml::1::base
[2022-11-30 20:29:36] INFO [liquibase.changelog] ChangeSet changelogs/prerequisite_checks.xml::1::base ran successfully in 16ms

Starting Liquibase at 23:59:58 (version 4.18.0 #5864 built at 2022-12-02 18:02+0000)
[2023-01-09 23:59:59] INFO [liquibase.lockservice] Successfully acquired change log lock
[2023-01-10 00:00:18] INFO [liquibase.changelog] Creating database history table with name: TEST_APP.DBCHANGELOG
[2023-01-10 00:00:18] INFO [liquibase.changelog] Reading from TEST_APP.DBCHANGELOG
Running Changeset: changelogs/prerequisite_checks.xml::1::base
[2023-01-10 00:22:13] INFO [liquibase.changelog] ChangeSet changelogs/prerequisite_checks.xml::1::base ran successfully in 16ms

Taking approx ~ 22 mins in version 4.17.2 and version 4.18.0

Starting Liquibase at 16:24:35 (version 4.14.0 #3667 built at 2022-07-22 18:36+0000)
[2022-07-29 16:24:37] INFO [liquibase.lockservice] Successfully acquired change log lock
[2022-07-29 16:24:51] INFO [liquibase.changelog] Creating database history table with name: TEST_APP.DBCHANGELOG
[2022-07-29 16:24:51] INFO [liquibase.changelog] Reading from TEST_APP.DBCHANGELOG
Running Changeset: changelogs/prerequisite_checks.xml::1::base
[2022-07-29 16:25:04] INFO [liquibase.changelog] ChangeSet changelogs/prerequisite_checks.xml::1::base ran successfully in 16ms

Taking approx ~ few secs in version 4.14.0 ( issue not seen here)

A clear and concise description of the issue being addressed.

  • Describe the actual problematic behavior.
  • Ensure private information is redacted.

Steps To Reproduce

  1. Run Liquibase version 4.14, runs fine no slowness seen
  2. Run Liquibase version 4.17.2 and version 4.18, takes long time as shown above, Issue seen in recent versions.

List the steps to reproduce the behavior.

  1. Run Liquibase version 4.14, runs fine no slowness seen
  2. Run Liquibase version 4.17.2 and version 4.18, takes long time as shown above, Issue seen in recent versions.

Actual Behavior

  1. Run Liquibase version 4.14, runs fine no slowness seen
  2. Run Liquibase version 4.17.2 and version 4.18, takes long time as shown above, Issue seen in recent versions.

Expected/Desired Behavior

  1. Run Liquibase version 4.17.2 and version 4.18, no slowness should be seen as mentioned in above steps.
    This should behave as Liquibase version 4.14.

Screenshots (if appropriate)

If applicable, add screenshots to help explain your problem.

Additional Context

Add any other context about the problem here.

@Sumitkrchaudhary
Copy link
Author

Jars used under /lib folder in version 4.14, version 4.17.2 and version 4.18
commons-lang3.jar
liquibase-core.jar
ojdbc8.jar
opencsv.jar
README.txt
snakeyaml.jar

@Sumitkrchaudhary Sumitkrchaudhary changed the title 4.18 and 4.17.2 taking long time is computing checksum Version 4.18 and 4.17.2 taking long time in computing checksum Jan 9, 2023
@FBurguer
Copy link

Hello! I personally didnt find any difference on the time between versions, so to have a better view of this issue, can you provide us with the output of --monitor-performance option. Thanks!

@Sumitkrchaudhary
Copy link
Author

Running with --monitor-performance
Starting Liquibase at 21:29:55 (version 4.18.0 #5864 built at 2022-12-02 18:02+0000)
[2023-01-17 21:29:57] INFO [liquibase.lockservice] Successfully acquired change log lock
[2023-01-17 21:30:13] INFO [liquibase.changelog] Creating database history table with name: TEST_APP.DBCHANGELOG
[2023-01-17 21:30:13] INFO [liquibase.changelog] Reading from TEST_APP.DBCHANGELOG
[2023-01-17 21:52:08] INFO [liquibase.lockservice] Successfully released change log lock
Do you want to see this operation's report in Liquibase Hub, which improves team collaboration?
If so, enter your email. If not, enter [N] to no longer be prompted, or [S] to skip for now, but ask again next time [S]:

In execution at :
[2023-01-17 21:30:13] INFO [liquibase.changelog] Reading from TEST_APP.DBCHANGELOG
[2023-01-17 21:52:08] INFO [liquibase.lockservice] Successfully released change log lock

It is taking around ~ 22 mins and there is one more addition due to prompt for "Liquibase Hub" it keeps on waiting in for input, Is there a way to disable this?
I tried keeping below settings in properties file:

Add your free Hub API key here

liquibase.hub.apikey:
liquibase.hub.mode=off

This is not considered when added in properties file. Is there a permanent way to disable this prompt as this is not needed and disrupting the upgrade/automation as keeps waiting for input.

@FBurguer
Copy link

if you input N or add liquibase.hub.mode=off it should stop asking so thats pretty odd. Can you send the complete jfr file that you get from the monitor? thanks!

@Sumitkrchaudhary
Copy link
Author

Sumitkrchaudhary commented Jan 27, 2023

I tried on multiple releases 4.14, 4.18 including Liquibase latest version 4.19 with parameter --monitor-performance=true in CLI or liquibase.monitorPerformance=true in properties file but seems it is not been considered as no jfr file is generated in the folder from where it is triggered. This was run including liquibase.hub.mode=off but no jfr file is generated. Is there any other setting that needs to be looked for jfr generation?
I had debug logs generated while looking at it for details, will this help?
In log files, on execution of Liquibase with parameters set in properties file it shows
Liquibase(4.19.0) Parameters:

-Dliquibase.monitorperformance=TRUE
-Dliquibase.hub.mode=OFF

@Sumitkrchaudhary
Copy link
Author

Log file content generation is same for version 4.18 and 4.19. Used latest version 4.19 also to confirm this slowness.

@Sumitkrchaudhary
Copy link
Author

Other finding between Version 4.14 where for new db setup slowness is not there as mentioned above with logs snippet but for existing db upgrade with version 4.14 jar
it shows slowness.
Starting Liquibase at 18:24:28 (version 4.14.0 #3667 built at 2022-07-22 18:36+0000)
[2023-01-27 18:24:29] INFO [liquibase.lockservice] Successfully acquired change log lock

[2023-01-27 18:24:43] INFO [liquibase.changelog] Reading from TEST_APP.DBCHANGELOG
--here takes around 38 mins for existing db upgrade with Version 4.14
[2023-01-27 19:02:45] INFO [liquibase.changelog] Reading from TEST_APP.DBCHANGELOG
Running Changeset: changelogs/prerequisite_checks.xml::1::base

@Sumitkrchaudhary
Copy link
Author

With Liquibase version 3.8.8 both new setup and upgrading existing database does not show any slowness as seen in above versions.
For this analysis it would be good to focus on latest version 4.19 as that also has slowness with same pattern as seen in version 4.17.2 and 4.18.

@FBurguer
Copy link

In what environment are running liquibase on? --monitor-performance should be a CLI argument not in the properties. Also its pretty odd the liquibase.hub.mode is not being pulled from the properties file, is there a posibilty that the liquibase working place is not what you are expecting?

@Sumitkrchaudhary
Copy link
Author

Running in Windows and on Oracle db.
As mentioned above, I tried with parameter
--monitor-performance=true in CLI
then I tried liquibase.monitorPerformance=true in properties file but seems it is not been considered as no jfr file is generated in the folder from where it is triggered. This was run including liquibase.hub.mode=off but no jfr file is generated. Is there any other setting that needs to be looked for jfr generation?

It seems both of the parameters are read correctly but --monitor-performance=true
In log files, on execution of Liquibase with parameters set in properties file it shows

Liquibase(4.19.0) Parameters:
-Dliquibase.monitorperformance=TRUE
-Dliquibase.hub.mode=OFF

Also --monitor-performance=true passed in CLI printed in log as :-
-Dhub-mode=OFF
-Dmonitor-performance=TRUE

Liquibase execution is done from correct place as the same works well and applying all changesets but not generating performance jfr file. It generates log with info and debug logs with debug parameter set where I can see changelogs are running fine.

@Sumitkrchaudhary
Copy link
Author

@Sumitkrchaudhary
Copy link
Author

@FBurguer
Copy link

FBurguer commented Feb 6, 2023

We are working on another performance issue that probably makes this issue a duplicate. But the problem with your environment not recognizing parameters as monitorperformance and hubmode is different. I think this has to do with how you run liquibase. If you can, can you send us a duplicate of your environment? Thanks!

@Sumitkrchaudhary
Copy link
Author

I tried and updated other performance issue #3694 but the provided fix is not fixing issue completely. In upgrading existing db the slowness still persists with new artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants