I have created a set of Liquibase scripts in a XML file. I have around 39 XML files like this. I am able to execute each of these XML files successfully.
However, I encountered a weird problem that when my WiFi is ON each XML file takes around 5 seconds to execute. When I turn it off, it takes less than a second to execute. So with WiFi ON it takes approx 240 seconds for all the XML files to complete. As you all will agree this is serious loss of productivity.
I dug deeper into this and found that in Liquibase code base there is a class called liquibase.lockservice.LockService
. This class has a method acquireLock()
which tries to update the database table DATABASECHANGELOGLOCK
to acquire the lock.
The query I found was as follows:
UPDATE DATABASECHANGELOGLOCK SET LOCKED = TRUE, LOCKEDBY = 'fe80:0:0:0:9c31:10ff:fe88:4316%9 (fe80:0:0:0:9c31:10ff:fe88:4316%9)', LOCKGRANTED = '2015-11-06 16:33:06.54' WHERE ID = 1 AND LOCKED = FALSE
The execution of this piece of code is the root cause of so much time consumption.
Does someone knows why this must be happening?
My operating system is Mac Yosemite v10.10.5 (14F27). (Important: My colleagues who are on earlier version of Mac don't face this problem). My Java version is 1.7.0_79 and my maven version is Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)