Dongfeng Lu
10/19/2024, 12:45 AMJan Kos
10/21/2024, 2:17 PM{
"ts": "2024-10-19 00:26:08.276",
"level": "INFO",
"logger": "liquibase.lockservice",
"thread": "main",
"msg": "Waiting for changelog lock...."
}
Metadata-api uses Liquibase for DB schema management. This tool uses a special database table to prevent accidental simultaneous schema modification from multiple places. When metadata-api pod starts and initializes liquibase, tool tries to insert row to table dbchangeloglock
. The problem happens when pod is restarted by k8s (e.g. by startup probe timeout) and lock row remains in db. other pods will keep waiting for the lock to be released, killed by k8s liveness probe eventually.
The only known solution is to connect to the md datatabase and remove the offending lock using command:
DELETE FROM dbchangeloglock;
Dongfeng Lu
10/21/2024, 9:26 PM