Liquibase queries getting executed multiple times

Hello everyone,

The team was doing performance test executions on Bahmni which uses OpenMRS 2.5.x. After multiple executions in the environment, we noticed spikes in the CPU and heap memory while profiling even when the environment was in an idle state, and that’s when we went ahead and explored more on the objects being created in the environment.

From the above screenshot, we can see that certain liquibase queries, that come from the liquibase-schema-only.xml, gets executed multiple times. One such query is createTable tableName=clob_datatype_storage as shown in the tab below next to description. The ConcurrentHashMapNode is created multiple times and occupies a considerable amount of memory. So, the questions that we had were

  1. Do we need to execute the queries in liquibase-schema-only.xml and liquibase-update-to-latest-2.5.x.xml multiple times?

  2. Any reason why the ConcurrentHashMapNode objects created are still persisted in the memory?

Thanks in advance

cc: @angshuonline @maharaja @mohant

2 Likes

@arjung - FYI, not sure if it is exactly related, but I recently created a ticket for some Liquibase-related performance issues I was experiencing. That issue is here if helpful: [TRUNK-6162] Speed up startup by eliminating redundant calls to getUnrunDatabaseChanges - OpenMRS Issues

1 Like