[MDEV-14123] .rocksdb folder may break workflow which re-create data directory Created: 2017-10-25  Updated: 2017-12-11  Resolved: 2017-12-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - RocksDB
Affects Version/s: 10.2
Fix Version/s: 10.2.12

Type: Bug Priority: Major
Reporter: Andrii Nikitin (Inactive) Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-12791 Default value of rocksdb_datadir not ... Closed
Relates
relates to MDEV-12451 SHOW DATABASES shows #mysql50#.rocksdb Closed
relates to MDEV-13505 mysql_upgrade failed with rocksdb Closed
relates to MDEV-14461 Connect + RocksDB Closed

 Description   

I did see many workflows/scripts which re-create data directory with commands like:

sudo rm -rf /var/lib/mysql/*
sudo mysql_install_db

OR :

sudo rm -rf /var/lib/mysql/*
cp -R /backup-location/* /var/lib/mysql/

The rm command will not clean up eventual .rocksdb folder, which may cause errors in new instance like:

2017-10-25 10:12:40 139671395502272 [Warning] RocksDB: Schema mismatch - Table d9.b is registered in RocksDB but does not have a .frm file
2017-10-25 10:12:40 139671395502272 [ERROR] RocksDB: Problems validating data dictionary against .frm files, exiting
2017-10-25 10:12:40 139671395502272 [ERROR] RocksDB: Failed to initialize DDL manager.
2017-10-25 10:12:40 139671395502272 [ERROR] Plugin 'ROCKSDB' init function returned error.
2017-10-25 10:12:40 139671395502272 [ERROR] Plugin 'ROCKSDB' registration as a STORAGE ENGINE failed.



 Comments   
Comment by Elena Stepanova [ 2017-10-25 ]

This folder causes problems on many levels (I've linked a couple of open issues). They must be solved somehow before MyRocks goes GA.

Comment by Sergei Petrunia [ 2017-12-07 ]

Changing its name is a question of changing the default value of rocksdb_datadir.

Trying to change to #rocksdb.
I still get "unknown database" in SHOW DATABASES:

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| #mysql50##rocksdb  |
| information_schema |

Comment by Sergei Petrunia [ 2017-12-11 ]

Renamed the folder to #rocksdb.

Generated at Thu Feb 08 08:11:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.