[MDEV-26774] Compression provider unloading at runtime has no effect but doesn't produce a warning Created: 2021-10-06  Updated: 2021-10-27  Resolved: 2021-10-09

Status: Closed
Project: MariaDB Server
Component/s: Plugins
Affects Version/s: N/A
Fix Version/s: 10.7.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-12933 sort out the compression library chaos Closed

 Description   

If a compression provider plugin is uninstalled at runtime, the command succeeds without errors or warnings, but in fact the compression algorithm is still available for table handling or even setting it as a default compression algorithm.
The test plugins.compression_load has this logic, so it must be intentional, and it is probably safer this way – causes less troubles and uncertainties regarding what should happen at runtime in this case. But at least a warning similar to existing "plugin is busy" would be informative. Even better if it were still possible to handle existing tables, but not to create new ones anymore, but it's probably difficult to achieve.

preview-10.7-MDEV-12933-provider-plugins 67a8fca9b7

MariaDB [test]> set global innodb_compression_algorithm= snappy;
ERROR 1231 (42000): Variable 'innodb_compression_algorithm' can't be set to the value of 'snappy'
 
MariaDB [test]> install soname 'provider_snappy';
Query OK, 0 rows affected (0.012 sec)
 
MariaDB [test]> uninstall soname 'provider_snappy';
Query OK, 0 rows affected (0.012 sec)
 
MariaDB [test]> set global innodb_compression_algorithm= snappy;
Query OK, 0 rows affected (0.000 sec)
 
MariaDB [test]> create table t (a text) page_compressed=1;
Query OK, 0 rows affected (0.131 sec)
 
MariaDB [test]> insert into t values ('foo');
Query OK, 1 row affected (0.015 sec)
 
MariaDB [test]> select * from t;
+------+
| a    |
+------+
| foo  |
+------+
1 row in set (0.001 sec)



 Comments   
Comment by Sergei Golubchik [ 2021-10-08 ]

Yes, difficult to achieve. We don't track when InnoDB uses compression libraries, so we cannot suddenly unload it. That's why provider plugins refuse to unload

Comment by Elena Stepanova [ 2021-10-08 ]

Right. So my main point is, it would be nicer if they were saying something when they refuse to unload, rather than just silently ignore the command.

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