You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +03:00
MCOL-4314 Related. Add shared dbroot1 synchronization
This commit is contained in:
@@ -318,12 +318,21 @@ if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
|
|||||||
chown -R mysql:mysql /var/lib/columnstore/storagemanager
|
chown -R mysql:mysql /var/lib/columnstore/storagemanager
|
||||||
IFLAG=/var/lib/columnstore/storagemanager/storagemanager-lock
|
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 storagemanager-lock already exists, we have already initialized
|
||||||
if [ ! -e $IFLAG ]; then
|
if [ ! -e $IFLAG ]; then
|
||||||
echo "Populating the engine initial system catalog."
|
echo "Populating the engine initial system catalog."
|
||||||
systemctl start mariadb-columnstore
|
systemctl start mariadb-columnstore
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
flock -u "$fd_lock"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $stop_mysqld -eq 1 ];then
|
if [ $stop_mysqld -eq 1 ];then
|
||||||
|
Reference in New Issue
Block a user