-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Improve LockService functionality and flexibility #1541
base: master
Are you sure you want to change the base?
Conversation
- Refactored code to fit with new Plugin system - Cleaned up duplicate/uneeded code - Introduced explicit NoLockService and liquibase.changeLogLockEnabled setting
- Refactoring to better isolate changeloglock table functionality in the StandardLockService class - Misc lock service code cleanup
public void waitForLock() throws LockException { | ||
|
||
boolean locked = false; | ||
long timeToGiveUp = new Date().getTime() + (getChangeLogLockWaitTime() * 1000 * 60); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might be worthwhile switching to Duration
types instead of numeric types for wait and recheck times.
# Conflicts: # liquibase-core/src/main/java/liquibase/lockservice/LockServiceFactory.java # liquibase-integration-tests/src/test/java/liquibase/statementexecute/CreateDatabaseChangeLogLockTableExecuteTest.java
Realized an issue with the heartbeat strategy: Liquibase currently makes just one connection but the heartbeat thread needs a separate connection for transaction reasons. We can't have the heartbeat committing the normal liquibase transaction, and we can't have it waiting for a commit from the normal connection. We'll have to build in support for opening separate connections before we can make progress on this. |
Codecov Report
@@ Coverage Diff @@
## master #1541 +/- ##
============================================
+ Coverage 48.01% 49.60% +1.59%
+ Complexity 7903 7867 -36
============================================
Files 793 757 -36
Lines 38608 37042 -1566
Branches 6904 6703 -201
============================================
- Hits 18536 18374 -162
+ Misses 17645 16236 -1409
- Partials 2427 2432 +5
Continue to review full report at Codecov.
|
Implementation of #1453