[MCOL-4093] "mysqld --bootstrap" / mysql_install_db fails with unhelpful errors if ColumnStore processes aren't running Created: 2020-06-23  Updated: 2023-10-25  Resolved: 2023-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: installation
Affects Version/s: 1.5.2
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Roman
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-4104 If ColumnStore services are not runni... Closed

 Description   

If ColumnStore is installed with MariaDB Community Server 10.5.4, then mysqld --bootstrap will hang when you run mysql_install_db if the ColumnStore processes aren't running.

For example, we can see that ColumnStore is installed:

$ sudo cat /etc/mysql/mariadb.conf.d/columnstore.cnf 
[mysqld]
plugin-load-add=ha_columnstore.so
plugin-maturity=beta
 
# Enable compression by default on create, set to NONE to turn off
#columnstore_compression_type=SNAPPY
 
# ColumnStore local query flag
#columnstore_local_query=0
 
#columnstore_diskjoin_smallsidelimit=0
#columnstore_diskjoin_largesidelimit=0
#columnstore_diskjoin_bucketsize=100
#columnstore_um_mem_limit=0
 
# Required for Schema Sync
#server-id = 1
#log_bin
 
# Uncomment for this UM to apply slave DML on ColumnStore tables
#columnstore_replication_slave=ON

And we can see that the ColumnStore processes are not running:

$ sudo systemctl status mariadb-columnstore
● mariadb-columnstore.service - mariadb-columnstore
   Loaded: loaded (/lib/systemd/system/mariadb-columnstore.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2020-06-22 23:58:42 UTC; 11s ago
  Process: 19504 ExecStop=/usr/bin/mariadb-columnstore-stop.sh (code=exited, status=0/SUCCESS)
  Process: 19039 ExecStart=/usr/bin/mariadb-columnstore-start.sh (code=exited, status=0/SUCCESS)
 Main PID: 19039 (code=exited, status=0/SUCCESS)

So let's say that we run mysql_install_db, like this:

$ sudo mysql_install_db --user=mysql --basedir=/usr/ --datadir=/var/lib/mysql/

It will fail with unhelpful error messages:

Installing MariaDB/MySQL system tables in '/var/lib/mysql/' ...
2020-06-23  0:04:07 0 [Warning] Plugin 'Columnstore' is of maturity level beta while the server is stable
2020-06-23  0:04:07 0 [Warning] Plugin 'COLUMNSTORE_COLUMNS' is of maturity level beta while the server is stable
2020-06-23  0:04:07 0 [Warning] Plugin 'COLUMNSTORE_TABLES' is of maturity level beta while the server is stable
2020-06-23  0:04:07 0 [Warning] Plugin 'COLUMNSTORE_FILES' is of maturity level beta while the server is stable
2020-06-23  0:04:07 0 [Warning] Plugin 'COLUMNSTORE_EXTENTS' is of maturity level beta while the server is stable
200623  0:04:07 Columnstore: Started; Version: 1.5.2-1
DBRM::send_recv caught: InetStreamSocket::connect: connect() error: Connection refused to: InetStreamSocket: sd: 37 inet: 127.0.0.1 port: 8616
DBRM::send_recv caught: InetStreamSocket::connect: connect() error: Connection refused to: InetStreamSocket: sd: 37 inet: 127.0.0.1 port: 8616
DBRM: SessionManager::sysCatVerID(): network error
DBRM::send_recv caught: InetStreamSocket::connect: connect() error: Connection refused to: InetStreamSocket: sd: 37 inet: 127.0.0.1 port: 8616
DBRM::send_recv caught: InetStreamSocket::connect: connect() error: Connection refused to: InetStreamSocket: sd: 37 inet: 127.0.0.1 port: 8616
ERROR: 1815  Internal error: Cannot execute the statement. DBRM is read only!
2020-06-23  0:04:08 0 [ERROR] Aborting

It would be more user friendly to print some kind of message like this instead:

ERROR: 1815  Internal error: Cannot communicate with MariaDB ColumnStore processes. Check the status of the processes by executing "systemctl status mariadb-columnstore."



 Comments   
Comment by Roman [ 2020-06-23 ]

This is an interesting exercise. We will consider this scenario.
MCS is suppose to be used with a presutup MDB. However if a user runs mysql_install_db this will wipe his current MDB syscat so I would suggest to just uninstall MCS plugin prior to mysql_install_db call and later install it back b/c he looses his data anyway.

Comment by Roman [ 2020-06-25 ]

I agree that in the long-term that should be fixed.
For someone who will handle this here is the relevant issue.

Generated at Thu Feb 08 02:47:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.