# Liquibase Ci CD

**URL:** <https://forum.liquibase.org/t/liquibase-ci-cd/7402>\
**Category:** General Discussion\
**Created:** [October 11, 2022, 4:14am UTC](https://forum.liquibase.org/t/liquibase-ci-cd/7402 "2022-10-11T04:14:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sannem](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sannem](https://forum.liquibase.org/u/sannem)\
**Post date:** [October 11, 2022, 4:14am UTC](https://forum.liquibase.org/t/liquibase-ci-cd/7402/1 "2022-10-11T04:14:56Z")

</div>

I would like to understand what happens to the liquibase update job when a pod hosting liquibase goes down mid-way. For example, I am adding a new non-null column into an existing table with million records. Since its non-null, I am assigning a default value which will be added to all the million rows. Lets say if the pod goes down after adding new column to 100k rows, what happens to the other 900k rows?

---

<div class="post-metadata">

**Author:** ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)\
**Post date:** [October 11, 2022, 3:33pm UTC](https://forum.liquibase.org/t/liquibase-ci-cd/7402/2 "2022-10-11T15:33:27Z")

</div>

Once a “Liquibase” SQL is running it will behave like any other client connection to the database. The DBMS will handle transaction control how it normally would. Speaking for Oracle, the ALTER TABLE transaction would get rolled-back. The only thing specific to Liquibase is that the Liquibase “lock” will be left “on” in the databasechangeloglock table since the Liquibase process was killed, and you will need to run the release-locks command to remove it.

I’d recommend putting a process in place to prevent your pod from stopping if Liquibase is running. See this topic for an example that I have implemented:

> [@Liquibase changelog release lock after certain time](https://forum.liquibase.org/t/liquibase-changelog-release-lock-after-certain-time/7306):
>
> Problem Statement: As part of CICD Approach multiple applications are deployed at once in a kubernetes cluster as pods . Applicstions update databases using liquibase update. Sometime one or more applications work on same database with ownership on different tables. Since changelog and changeloglock is common across a database, if one application acquires a lock, other applications waits for lock for time defined in changelog-lock-wait-time-in-minutes . This works fine until the application th…

---

<div class="post-metadata">

**Author:** ![sannem](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sannem](https://forum.liquibase.org/u/sannem)\
**Post date:** [October 11, 2022, 4:57pm UTC](https://forum.liquibase.org/t/liquibase-ci-cd/7402/3 "2022-10-11T16:57:38Z")

</div>

Thanks for the reply. Yes I am aware of the lock by liquibase.  
So if pod goes down databse would usually rollback, fair enough.  
There is also one alternate approach I am considering, other than kubernetes, which is Lambda.  
Maximum time lambda can run is 15 minutes. Do you know how to handle longer liquibase updates in such scenarios.

---

<div class="post-metadata">

**Author:** ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)\
**Post date:** [October 11, 2022, 9:00pm UTC](https://forum.liquibase.org/t/liquibase-ci-cd/7402/4 "2022-10-11T21:00:08Z")

</div>

I don’t really know about lamdbas, but database deployments can run hours, so 15 minutes seems much too small. Last week I had a customer run a Liquibase deployment that ran 8 hours building a massive index.

---

<div class="post-metadata">

**Author:** ![sannem](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sannem](https://forum.liquibase.org/u/sannem)\
**Post date:** [October 11, 2022, 9:32pm UTC](https://forum.liquibase.org/t/liquibase-ci-cd/7402/5 "2022-10-11T21:32:51Z")

</div>

Yes, scenarios like indexing can run into hours. Anyone using lambda for liquibase, please give your inputs how you handled. Thanks.

---

<div class="post-metadata">

**Author:** ![sannem](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sannem](https://forum.liquibase.org/u/sannem)\
**Post date:** [October 13, 2022, 5:14am UTC](https://forum.liquibase.org/t/liquibase-ci-cd/7402/6 "2022-10-13T05:14:09Z")

</div>

Can I use AWS Fargate to deploy liquibase instead of lambda. Has anyone used this before.
