[MCOL-3576] bulk writes still possible after mcsadmin suspenddatabasewrites Created: 2019-10-28  Updated: 2023-10-26  Resolved: 2019-11-19

Status: Closed
Project: MariaDB ColumnStore
Component/s: writeengine
Affects Version/s: 1.2.5, 1.4.0
Fix Version/s: 1.4.1

Type: Bug Priority: Major
Reporter: Jens Röwekamp (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: SkySQLMVP
Environment:

CentOS 7


Sprint: 2019-06

 Description   

Bulk writes through mcsapi are still possible after setting ColumnStore into read only mode through "mcsadmin suspenddatabasewrites".

How to reproduce:

...
Starting MariaDB ColumnStore Database Platform Starting, please wait ........ DONE
 
System Catalog Successfull Created
 
MariaDB ColumnStore Install Successfully Completed, System is Active
 
Enter the following command to define MariaDB ColumnStore Alias Commands
 
. /etc/profile.d/columnstoreAlias.sh
 
Enter 'mcsmysql' to access the MariaDB ColumnStore SQL console
Enter 'mcsadmin' to access the MariaDB ColumnStore Admin console
 
NOTE: The MariaDB ColumnStore Alias Commands are in /etc/profile.d/columnstoreAlias.sh
 
[root@centos7 ~]# . /etc/profile.d/columnstoreAlias.sh
[root@centos7 ~]# mcsmysql test -e "CREATE TABLE tmp1 (i int) engine=columnstore;"
[root@centos7 ~]# mcsadmin suspenddatabasewrites
suspenddatabasewrites   Mon Oct 28 10:10:45 2019
 
This command suspends the DDL/DML writes to the MariaDB ColumnStore Database
           Do you want to proceed: (y or n) [n]: y
 
Suspend MariaDB Columnstore Database Writes Request successfully completed
[root@centos7 ~]# mcsadmin getsysteminfo
getsysteminfo   Mon Oct 28 10:10:57 2019
 
System columnstore-1
 
System and Module statuses
 
Component     Status                       Last Status Change
------------  --------------------------   ------------------------
System        ACTIVE WRITE SUSPENDED       Mon Oct 28 10:09:47 2019
 
Module pm1    ACTIVE                       Mon Oct 28 10:09:39 2019
 
 
MariaDB ColumnStore Process statuses
 
Process             Module    Status            Last Status Change        Process ID
------------------  ------    ---------------   ------------------------  ----------
ProcessMonitor      pm1       ACTIVE            Mon Oct 28 10:09:05 2019       13725
ProcessManager      pm1       ACTIVE            Mon Oct 28 10:09:11 2019       13981
DBRMControllerNode  pm1       ACTIVE            Mon Oct 28 10:09:18 2019       14401
ServerMonitor       pm1       ACTIVE            Mon Oct 28 10:09:21 2019       14420
DBRMWorkerNode      pm1       ACTIVE            Mon Oct 28 10:09:21 2019       14476
PrimProc            pm1       ACTIVE            Mon Oct 28 10:09:24 2019       14509
ExeMgr              pm1       ACTIVE            Mon Oct 28 10:09:29 2019       14841
WriteEngineServer   pm1       WRITE_SUSPEND     Mon Oct 28 10:09:33 2019       14910
DDLProc             pm1       WRITE_SUSPEND     Mon Oct 28 10:09:37 2019       14983
DMLProc             pm1       WRITE_SUSPEND     Mon Oct 28 10:09:46 2019       15053
mysqld              pm1       ACTIVE            Mon Oct 28 10:09:27 2019       14329
 
Active Alarm Counts: Critical = 0, Major = 0, Minor = 0, Warning = 0, Info = 0
[root@centos7 ~]# python3
Python 3.6.8 (default, Aug  7 2019, 17:28:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymcsapi
>>> d = pymcsapi.ColumnStoreDriver()
>>> b = d.createBulkInsert("test", "tmp1", 0, 0)
>>> b.setColumn(0, 42)
[<pymcsapi.ColumnStoreBulkInsert; proxy of <Swig Object of type 'mcsapi::ColumnStoreBulkInsert *' at 0x7f066611be40> >, 0]
>>> b.writeRow()
<pymcsapi.ColumnStoreBulkInsert; proxy of <Swig Object of type 'mcsapi::ColumnStoreBulkInsert *' at 0x7f066611be10> >
>>> b.commit()
>>> exit()
[root@centos7 ~]# mcsmysql test -e "SELECT * FROM tmp1;"
+------+
| i    |
+------+
|   42 |
+------+
[root@centos7 ~]# mcsadmin getsysteminfo
getsysteminfo   Mon Oct 28 10:13:14 2019
 
System columnstore-1
 
System and Module statuses
 
Component     Status                       Last Status Change
------------  --------------------------   ------------------------
System        ACTIVE WRITE SUSPENDED       Mon Oct 28 10:09:47 2019
 
Module pm1    ACTIVE                       Mon Oct 28 10:09:39 2019
 
 
MariaDB ColumnStore Process statuses
 
Process             Module    Status            Last Status Change        Process ID
------------------  ------    ---------------   ------------------------  ----------
ProcessMonitor      pm1       ACTIVE            Mon Oct 28 10:09:05 2019       13725
ProcessManager      pm1       ACTIVE            Mon Oct 28 10:09:11 2019       13981
DBRMControllerNode  pm1       ACTIVE            Mon Oct 28 10:09:18 2019       14401
ServerMonitor       pm1       ACTIVE            Mon Oct 28 10:09:21 2019       14420
DBRMWorkerNode      pm1       ACTIVE            Mon Oct 28 10:09:21 2019       14476
PrimProc            pm1       ACTIVE            Mon Oct 28 10:09:24 2019       14509
ExeMgr              pm1       ACTIVE            Mon Oct 28 10:09:29 2019       14841
WriteEngineServer   pm1       WRITE_SUSPEND     Mon Oct 28 10:09:33 2019       14910
DDLProc             pm1       WRITE_SUSPEND     Mon Oct 28 10:09:37 2019       14983
DMLProc             pm1       WRITE_SUSPEND     Mon Oct 28 10:09:46 2019       15053
mysqld              pm1       ACTIVE            Mon Oct 28 10:09:27 2019       14329
 
Active Alarm Counts: Critical = 0, Major = 0, Minor = 0, Warning = 0, Info = 0
[root@centos7 ~]#



 Comments   
Comment by Daniel Lee (Inactive) [ 2019-11-19 ]

Build verified: 1.4.1-1 github source

Server
commit 589a1235b64866c7bbe85da2a6f6bf19ee8282fe
Merge: 77a245f 39d8652
Author: Marko Mäkelä <marko.makela@mariadb.com>
Date: Tue Nov 19 01:32:50 2019 +0200

Engine
commit 7c6a086cfb54b8bbd500efb41f34c9fa1ed03ca1
Merge: f291d88 1a94d53
Author: Roman Nozdrin <drrtuy@gmail.com>
Date: Mon Nov 18 12:11:30 2019 +0300

>>> import pymcsapi
>>> d = pymcsapi.ColumnStoreDriver()
>>> b = d.createBulkInsert("test", "tmp1", 0, 0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/pymcsapi.py", line 922, in createBulkInsert
return _pymcsapi.ColumnStoreDriver_createBulkInsert(self, db, table, mode, pm)
RuntimeError: ColumnStore is write suspended
>>>

Also verified cpimport

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