Spring boot Spring引导-Liquibase-偶尔需要很长时间(60倍)才能执行 配置

Spring boot Spring引导-Liquibase-偶尔需要很长时间(60倍)才能执行 配置,spring-boot,liquibase,Spring Boot,Liquibase,我正在使用Spring Boot2.3.2。在类路径上用Liquibase释放 build.gradle 6.4.1: id 'org.liquibase.gradle' version '2.0.4' implementation 'org.liquibase:liquibase-core:4.0.0' application.properties: spring.liquibase.changeLog=classpath:db/changelog/db.changelog-master.x

我正在使用Spring Boot
2.3.2。在类路径上用
Liquibase
释放

build.gradle 6.4.1:

id 'org.liquibase.gradle' version '2.0.4'
implementation 'org.liquibase:liquibase-core:4.0.0'
application.properties:

spring.liquibase.changeLog=classpath:db/changelog/db.changelog-master.xml
spring.liquibase.user=username
spring.liquibase.password=password
db.changelog-master.xml

<?xml version="1.0" encoding="UTF-8"?>   
<databaseChangeLog  
  xmlns="http://www.liquibase.org/xml/ns/dbchangelog"  
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
                      http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">  
   <preConditions>
      <dbms type="oracle"/>
   </preConditions>
   
   <include file="db/changelog/db.changelog-1.0.oracle.sql"/> 
</databaseChangeLog> 
DATABASECHANGELOG
表包含预期的8个条目

问题 我偶尔会遇到延迟问题,特别是当我刚刚启动STS 4.5.1 IDE(通过VPN远程连接到DB)时,但当应用程序重新运行/重新启动时,我不会再遇到延迟问题,直到将来某个时候。我无法更准确地描述这个问题,也无法随意复制这个问题

因此,我设置了
logging.level.liquibase=DEBUG
,这就是延迟发生的地方:

延迟记录(约4分钟) :
2020-07-27 12:55:33015[重新启动主]调试liquibase.servicelocator-加载的liquibase.diff.compare.DatabaseObjectComparator实例com.datical.liquibase.ext.storedlogic.checkconstraint.CheckConstraintComparator

2020-07-27[restartedMain]DEBUG liquibase.util-将1595825733018的校验和计算为2349116d802a7d8314d3cced0b6e2f95
2020-07-27[restartedMain]调试liquibase.executor-使用“jdbc”执行器执行

2020-07-27 12:59:29966[restartedMain]调试liquibase.executor-使用“jdbc”执行器执行
2020-07-27 12:59:29975[restartedMain]INFO liquibase.changelog-从XXX.DATABASECHANGELOG读取
2020-07-27 12:59:29976[restartedMain]调试liquibase.executor-使用“jdbc”执行器执行
2020-07-27 12:59:30188[restartedMain]DEBUG liquibase.util-输入流的计算校验和为69be88e5a0af937fcecaeb79fb44811d

无延迟记录(约4秒) 在正常时间:


2020-07-27 13:12:04672[重新启动主]调试liquibase.servicelocator-加载的liquibase.diff.compare.DatabaseObjectComparator实例com.datical.liquibase.ext.storedlogic.StoredLogicComparator 2020-07-27 13:12:04673[重新启动主]调试liquibase.servicelocator-加载的liquibase.diff.compare.DatabaseObjectComparator实例com.datical.liquibase.ext.storedlogic.checkconstraint.CheckConstraintComparator

2020-07-27[restartedMain]DEBUG liquibase.util-将1595826724675的校验和计算为56c113e10add546ca00dadcb20c71635
2020-07-27[restartedMain]调试liquibase.executor-使用“jdbc”执行 执行人

2020-07-27 13:12:08979[restartedMain]调试liquibase.executor-使用“jdbc”执行器执行
2020-07-27 13:12:08988[重新启动主]信息liquibase.changelog-从XXX.DATABASECHANGELOG读取
2020-07-27 13:12:08988[restartedMain]调试liquibase.executor-使用“jdbc”执行器执行
2020-07-27 13:12:09031[restartedMain]DEBUG liquibase.util-输入流的计算校验和为69be88e5a0af937fcecaeb79fb44811d

任何关于延迟来自何处的提示都将不胜感激

编辑1 发帖后,我意识到我不需要这个插件:
id“org.liquibase.gradle”版本“2.0.4”

我不知道这是否是延迟的原因,但我刚刚将其删除

编辑2 ~4分钟的延迟不是因为插件,它仍然在发生:

2020-07-29 08:49:06074[restartedMain]DEBUG liquibase.util-将1595983746073的校验和计算为431beddb3aa3ca2d61f0c8b37185ae04
2020-07-29 08:53:14902[restartedMain]调试liquibase.executor-使用“jdbc”执行器执行

--liquibase formatted sql

--changeset author:date-1
--preconditions onFail:MARK_RAN
--precondition-sql-check expectedResult:0 SELECT count(*) FROM user_tables WHERE table_name = 'XXX';
SQL 1;
: