The data will not be re-compressed immediately. However, all new SST files will use the new compression settings, so as data gets inserted/updated the column family will gradually start using the new option.
Caveat: Syntax Errors
Please note that rocksdb-override-cf-options syntax is quite strict. Any typos will result in the parse error, and MyRocks plugin will not be loaded. Depending on your configuration, the server may still start. If it does start, you can use this command to check if the plugin is loaded:
select * from information_schema.plugins where plugin_name='ROCKSDB'
(note that you need the "ROCKSDB" plugin. Other auxiliary plugins like "ROCKSDB_TRX" might still get loaded).
Another way is to detect the error is check the error log. When option parsing fails, it will contain messages like so:
2019-04-16 11:07:57 140283675678016 [Warning] Invalid cf config for cf1 in override options (options: cf1={compression=kLZ4Compression;bottommost_compression=kZSTDCompression;})
2019-04-16 11:07:57 140283675678016 [ERROR] RocksDB: Failed to initialize CF options map.
2019-04-16 11:07:57 140283675678016 [ERROR] Plugin 'ROCKSDB' init function returned error.
2019-04-16 11:07:57 140283675678016 [ERROR] Plugin 'ROCKSDB' registration as a STORAGE ENGINE failed.
Checking How the Data is Compressed
A query to check what compression is used in the SST files that store the data for a given table (test.t1):
select
SP.sst_name, SP.compression_algo
from
information_schema.rocksdb_sst_props SP,
information_schema.rocksdb_ddl D,
information_schema.rocksdb_index_file_map IFM
where
D.table_schema='test' and D.table_name='t1' and
D.index_number= IFM.index_number and
IFM.sst_name=SP.sst_name;