From 49e3d76db14ed6d02f913e9ddeee730287e2e4b4 Mon Sep 17 00:00:00 2001 From: Jose Rojas Date: Thu, 1 Oct 2020 15:48:27 -0500 Subject: [PATCH] MCOL-4314 Related. Add shared dbroot1 synchronization --- oam/install_scripts/columnstore-post-install.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/oam/install_scripts/columnstore-post-install.in b/oam/install_scripts/columnstore-post-install.in index 0d9e1aef3..3e654039e 100755 --- a/oam/install_scripts/columnstore-post-install.in +++ b/oam/install_scripts/columnstore-post-install.in @@ -318,12 +318,21 @@ if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then chown -R mysql:mysql /var/lib/columnstore/storagemanager IFLAG=/var/lib/columnstore/storagemanager/storagemanager-lock - # prevent nodes using shared storage manager from stepping on each other when initializing + # shared dbroot1 synchronization + # prevents dbbuilder from processing simultaneously on two or more nodes + exec {fd_lock}>/var/lib/columnstore/data1/dbroot1-lock + flock -x "$fd_lock" + + # shared storagemanager data corruption prevention + # intially, a node is in a single node setting and takes ownership of storagemanager + # prevent nodes using shared storage manager from stepping on each other # if storagemanager-lock already exists, we have already initialized if [ ! -e $IFLAG ]; then echo "Populating the engine initial system catalog." systemctl start mariadb-columnstore fi + + flock -u "$fd_lock" fi if [ $stop_mysqld -eq 1 ];then