Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install rocksdb plugin #486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Install rocksdb plugin #486

wants to merge 1 commit into from

Conversation

ifel
Copy link

@ifel ifel commented Feb 3, 2023

RocksDB engine is officially supported by MariaDB (https://mariadb.com/kb/en/getting-started-with-myrocks/), but the image does not have the plugin installed. Install it, so users will be able to load it if it's needed.

@grooverdan
Copy link
Member

Yes, also see: https://mariadb.org/installing-plugins-in-the-mariadb-docker-library-container/

There's a big tradeoff between basic images and all plugins.

There was some discussion about making a separate image layer for plugins like RocksDB.

@ifel
Copy link
Author

ifel commented Jul 12, 2023

Yes, also see: https://mariadb.org/installing-plugins-in-the-mariadb-docker-library-container/

There's a big tradeoff between basic images and all plugins.

There was some discussion about making a separate image layer for plugins like RocksDB.

This makes total sense. Thank you. The link describes different ways of enabling plugins that already baked into the image, but not loaded/enabled by default. The problem with the rocksdb one, it's not in the image, so even if user wants it to be loaded and enabled, they cannot do this, as the plugin (so file) does not exist in the image. This PR basically installs the plugin into the image. This increases the image size by ~6.7MB, it's just 1% of the overall image size - 481MB.

The problem was, it was installed upon server startup (because the package adds a config file with plugin installation), I've modified the Docker file to remove the file from the image, so now, it does not get installed on the server start up, but can be installed by user.

MariaDB [(none)]> SHOW PLUGINS SONAME LIKE 'ha_rocks%';
+-----------------------------+---------------+--------------------+---------------+---------+
| Name                        | Status        | Type               | Library       | License |
+-----------------------------+---------------+--------------------+---------------+---------+
| ROCKSDB                     | NOT INSTALLED | STORAGE ENGINE     | ha_rocksdb.so | GPL     |
| ROCKSDB_CFSTATS             | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_DBSTATS             | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_PERF_CONTEXT        | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_PERF_CONTEXT_GLOBAL | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_CF_OPTIONS          | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_COMPACTION_STATS    | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_GLOBAL_INFO         | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_DDL                 | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_SST_PROPS           | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_INDEX_FILE_MAP      | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_LOCKS               | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_TRX                 | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_DEADLOCK            | NOT INSTALLED | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
+-----------------------------+---------------+--------------------+---------------+---------+
14 rows in set (0.085 sec)

MariaDB [(none)]> INSTALL SONAME 'ha_rocksdb';
Query OK, 0 rows affected, 1 warning (2.088 sec)

MariaDB [(none)]> SHOW PLUGINS SONAME LIKE 'ha_rocks%';
+-----------------------------+--------+--------------------+---------------+---------+
| Name                        | Status | Type               | Library       | License |
+-----------------------------+--------+--------------------+---------------+---------+
| ROCKSDB                     | ACTIVE | STORAGE ENGINE     | ha_rocksdb.so | GPL     |
| ROCKSDB_CFSTATS             | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_DBSTATS             | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_PERF_CONTEXT        | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_PERF_CONTEXT_GLOBAL | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_CF_OPTIONS          | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_COMPACTION_STATS    | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_GLOBAL_INFO         | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_DDL                 | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_SST_PROPS           | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_INDEX_FILE_MAP      | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_LOCKS               | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_TRX                 | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_DEADLOCK            | ACTIVE | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
+-----------------------------+--------+--------------------+---------------+---------+
14 rows in set (0.002 sec)

@grooverdan
Copy link
Member

@ifel good points. Thanks for measuring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants