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

Grails 3 GORM - must have same number of columns as the referenced primary key issue
“grails.mongodb.default.mapping” equivalent in application.yml in Grails 3.2
TenantId is null when saving an entity in a Discriminator based multi tenant application in Grails 3.2 with GORM 6
Grails 3 (unsaved) instance issue while fetching from database (GORM)
Can't use get() in domain using Grails3
GORM findAll + cannot pass dynamic List as named parameter
How to display database records in grails
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)?

Categories

HOME
multithreading
variables
zeromq
isabelle
path-finding
hashmap
dot
relay
spring-cloud-stream
yarn
leon
infragistics
installshield
angular-ui-bootstrap
blueprintjs
pivotal-cloud-foundry
webrequest
awesome-wm
facebook-php-sdk
communication
imacros
google-cloud-spanner
decomposition
carthage
saxon
footer
database-replication
viewport
alpine
jtextfield
sox
extjs5
lcd
sqlcipher
semantic-analysis
django-storage
assistant
ejabberd-module
compatibility
facebook-apps
objectanimator
tinymce-4
data-manipulation
karaf
typed.js
webtest
asset-pipeline
gammu
picasso
http-digest
bitbucket-pipelines
serve
objectlistview
code-search-engine
unspecified
fedex
angular2-meteor
qwt
avconv
pnotify
sage-one
git-diff
yii2-extension
aurelia-validation
elgg
directory-structure
sqlclient
pillow
gcsfuse
lync-client-sdk
setuptools
savon
paypal-express
contact-list
rvest
browser-link
freelancer.com-api
iad
rtbkit
spim
ora-00900
content-length
map-projections
system32
graph-api-explorer
jsapi
csquery
nsmutabledictionary
system.reflection
tween
tablelayout
angularjs-ng-click
java-metro-framework
rebol3
html5-notifications
terminal-services
ivyde
flash-builder4.5
pushbackinputstream
html-editor
distutils
typoscript2
automount
dbproviderfactories
netbeans-6.9
spring-portlet-mvc
bigcouch
spyware
gcj
javax.script
floating
rescale
yagni
defensive-programming
dbisam

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