gorm


What happens when two app servers in cluster start LiquiBase update (via Grails)?


I am planning to use LiquiBase via grails database-migration plugin. When I start a cluster of two servers with a new version of the DB schema, and both servers attempt to start schema upgrade, what will happen?
Does either grails database-migration plugin or LiquiBase itself has protection against concurrent upgrade attempt?
In addition to your database tables, Liquibase creates a databasechangelog and a databasechangeloglock table to manage its state. databasechangelog contains information about the migrations that you've already run, and databasechangeloglock is there to guard against concurrent attempts at running migrations.
When the first cluster instance starts up it will obtain a lock by inserting a row in the databasechangeloglock table, and run any missing migrations. When the second one starts it'll be blocked until the lock is freed, then it'll obtain a lock and since there won't be any un-run migrations, it won't do anything.

Related Links

Configure Grails 3.0.9 for Oracle 12c with identity PK?
Adding condition to findAll and findAllBy methods
Neo4j and Mongodb as datasource in Grails
GORM (varchar .save(), non DATE): ORA-01861: literal does not match format string
GORM addTo methods not found in Spock test
spring-boot property exception while externalizing datasource properties and using actuator
Mapping hasMany relation and saving the related data
Method on class [] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails Correctly
What happens when two app servers in cluster start LiquiBase update (via Grails)?
use of mappedBy in Many to Many relationship in Grails
Domain class auto validation in grails
Grails Detached Criteria Query and “group by” and “having” clause
Script for saving large no of entries in mongodb
Does the multiple datasource feature of Grails 2.0 support relations?
How to avoid ImprovedNamingStrategy in joinTable in Grails
Grails 2 Show transient property that is an alias for id column

Categories

HOME
maven
vim
testng
ngrx
plone
comparison
jira
yahoo-oauth
sqlite3
ravendb
datastax-java-driver
upload
contact
add
slurm
midi
dax
correlation
zend-framework3
systemc
libtiff
seaborn
transformation
jsdoc
karma-jasmine
riot.js
sox
java-7
bootstrap-duallistbox
spring-mybatis
gitignore
file-rename
nat
frame
ecto
.net-4.0
protovis
language-concepts
android-browser
c11
sas-visual-analytics
particles.js
unoconv
optix
outlook-api
google-datalayer
osx-mavericks
jedis
jlink
hls.js
jxcore
crypt
libusb-win32
blacklist
objective-c-swift-bridge
jquery-filter
infix-notation
gstreamer-0.10
angstrom-linux
bgp
pickadate
yaws
associative-array
system.management
pyke
freedesktop.org
vhd
ora-00900
sdhc
qdialog
simple-framework
responsive-images
graph-drawing
sniffer
android-nested-fragment
mdt
onactivityresult
yorick
htmlcleaner
valuechangelistener
aqtime
blending
opcache
dotnetnuke-5
excel-2003
clipper
unc
trusted
coderush
xdomainrequest
rfc1123
appender
krl
h.323
createwindow
zend-translate
paster
coda-slider
infrastructure
revisions
vc90
data-driven
ctp4
pascal-fc
thread-local-storage
geneva-server
caching-application-block
ntvdm.exe

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App