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

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
How to save GORM class with composite id made from its own field?
Grails - 2 domains and 1 form create/update/edit issues

Categories

HOME
ibm-bluemix
cloud
debugging
activiti
azure-data-factory
fft
raspberry-pi
bpmn
webstorm
bookshelf.js
malloc
paradox
pheatmap
maude-system
tomcat6
modx-revolution
remote-access
opentracing
shared-hosting
viewport
google-pagespeed
introduction
swiftlint
clickonce
jquery-ajaxq
kudan
icloud-api
spark-jobserver
user-interaction
bootstrap-material-design
rst2pdf
fluentvalidation
srcset
.net-4.0
gammu
ghost4j
y86
android-ble
io-redirection
hot-module-replacement
email-templates
quadratic-programming
estimote
slick-3.0
osx-mavericks
qsslsocket
powercli
mu
tropo
worker-thread
font-size
pearson
epson
zendesk-app
root-framework
parallel-data-warehouse
wdf
savon
multi-level
websitepanel
react-native-listview
qgraphicsview
pagerank
pyke
energy
tcpserver
maven-tomcat-plugin
python-3.2
mutation-observers
dukescript
operation
e10s
c++03
formatjs
javafx-webengine
qcodo
yorick
mechanize-ruby
rtmfp
android-2.2-froyo
algebraic-data-types
stxxl
pyhdf
c18
runtime.exec
listings
opcache
bluepill
dotnethighcharts
pydot
gcj
rfc1123
imac
w3wp.exe
sproutcore-2
firefox-5
nintendo-ds
iweb
virtual-functions
.net-1.0
uiq3

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App