Well I might be wrong about this, but it's annoying (so I'll create it as Improvement for now). This option is dynamic and whatever you do with it in mysql client it finishes OK and without warnings or errors, but the actual warnings and errors can be seen in the error log.
So basically whenever you make some change here you need to check error log otherwise you can't be sure the change was applied.
It would be much better IMHO to show warnings with "show warnings" command and throw errors immediately.
ERROR LOG:
2017-08-29T13:08:09.999526Z 4 [Note] RocksDB: creating a column family cf1 2017-08-29T13:08:09.999572Z 4 [Note] write_buffer_size=67108864 2017-08-29T13:08:09.999583Z 4 [Note] target_file_size_base=67108864 2017-08-29T13:08:23.522008Z 4 [Note] MyRocks: options for column family 'cf1' have been successfully updated. 2017-08-29T13:12:06.333228Z 4 [Warning] MyRocks: failed to apply the options for column family 'cf1'. Invalid argument: Option not changeable: compression_per_level 2017-08-29T13:16:53.274033Z 4 [Warning] Invalid cf options, '=' expected (options: aaaaa) 2017-08-29T13:16:53.274092Z 4 [Warning] MyRocks: failed to parse the updated column family options = 'aaaaa'. 2017-08-29T13:16:57.985394Z 4 [Warning] MyRocks: NULL is not a valid option for updates to column family settings.
CLIENT:
mysql> select * from information_schema.rocksdb_cf_options where option_type like '%compression%' or option_type in ('write_buffer_size','target_file_size_base'); +------------+------------------------+---------------------------+ | CF_NAME | OPTION_TYPE | VALUE | +------------+------------------------+---------------------------+ | __system__ | WRITE_BUFFER_SIZE | 67108864 | | __system__ | TARGET_FILE_SIZE_BASE | 67108864 | | __system__ | COMPRESSION_TYPE | kNoCompression | | __system__ | COMPRESSION_PER_LEVEL | NUL | | __system__ | COMPRESSION_OPTS | -14:-1:0 | | __system__ | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | | cf1 | WRITE_BUFFER_SIZE | 67108864 | | cf1 | TARGET_FILE_SIZE_BASE | 67108864 | | cf1 | COMPRESSION_TYPE | kNoCompression | | cf1 | COMPRESSION_PER_LEVEL | kZlibCompression | | cf1 | COMPRESSION_OPTS | -14:-1:0 | | cf1 | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | | default | WRITE_BUFFER_SIZE | 67108864 | | default | TARGET_FILE_SIZE_BASE | 67108864 | | default | COMPRESSION_TYPE | kNoCompression | | default | COMPRESSION_PER_LEVEL | NUL | | default | COMPRESSION_OPTS | -14:-1:0 | | default | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | +------------+------------------------+---------------------------+ 18 rows in set (0.00 sec) mysql> SET @@global.rocksdb_update_cf_options = 'cf1={write_buffer_size=8m;target_file_size_base=2m}'; Query OK, 0 rows affected (0.01 sec) mysql> select * from information_schema.rocksdb_cf_options where option_type like '%compression%' or option_type in ('write_buffer_size','target_file_size_base'); +------------+------------------------+---------------------------+ | CF_NAME | OPTION_TYPE | VALUE | +------------+------------------------+---------------------------+ | __system__ | WRITE_BUFFER_SIZE | 67108864 | | __system__ | TARGET_FILE_SIZE_BASE | 67108864 | | __system__ | COMPRESSION_TYPE | kNoCompression | | __system__ | COMPRESSION_PER_LEVEL | NUL | | __system__ | COMPRESSION_OPTS | -14:-1:0 | | __system__ | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | | cf1 | WRITE_BUFFER_SIZE | 8388608 | | cf1 | TARGET_FILE_SIZE_BASE | 2097152 | | cf1 | COMPRESSION_TYPE | kNoCompression | | cf1 | COMPRESSION_PER_LEVEL | kZlibCompression | | cf1 | COMPRESSION_OPTS | -14:-1:0 | | cf1 | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | | default | WRITE_BUFFER_SIZE | 67108864 | | default | TARGET_FILE_SIZE_BASE | 67108864 | | default | COMPRESSION_TYPE | kNoCompression | | default | COMPRESSION_PER_LEVEL | NUL | | default | COMPRESSION_OPTS | -14:-1:0 | | default | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | +------------+------------------------+---------------------------+ 18 rows in set (0.00 sec) mysql> SET @@global.rocksdb_update_cf_options = 'cf1={compression_per_level=kLZ4Compression}'; Query OK, 0 rows affected (0.00 sec) mysql> show warnings; Empty set (0.00 sec) mysql> select * from information_schema.rocksdb_cf_options where option_type like '%compression%' or option_type in ('write_buffer_size','target_file_size_base'); +------------+------------------------+---------------------------+ | CF_NAME | OPTION_TYPE | VALUE | +------------+------------------------+---------------------------+ | __system__ | WRITE_BUFFER_SIZE | 67108864 | | __system__ | TARGET_FILE_SIZE_BASE | 67108864 | | __system__ | COMPRESSION_TYPE | kNoCompression | | __system__ | COMPRESSION_PER_LEVEL | NUL | | __system__ | COMPRESSION_OPTS | -14:-1:0 | | __system__ | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | | cf1 | WRITE_BUFFER_SIZE | 8388608 | | cf1 | TARGET_FILE_SIZE_BASE | 2097152 | | cf1 | COMPRESSION_TYPE | kNoCompression | | cf1 | COMPRESSION_PER_LEVEL | kZlibCompression | | cf1 | COMPRESSION_OPTS | -14:-1:0 | | cf1 | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | | default | WRITE_BUFFER_SIZE | 67108864 | | default | TARGET_FILE_SIZE_BASE | 67108864 | | default | COMPRESSION_TYPE | kNoCompression | | default | COMPRESSION_PER_LEVEL | NUL | | default | COMPRESSION_OPTS | -14:-1:0 | | default | BOTTOMMOST_COMPRESSION | kDisableCompressionOption | +------------+------------------------+---------------------------+ 18 rows in set (0.01 sec) mysql> SET @@global.rocksdb_update_cf_options = 'aaaaa'; Query OK, 0 rows affected (0.00 sec) mysql> SET @@global.rocksdb_update_cf_options = NULL; Query OK, 0 rows affected (0.00 sec)
- is blocked by
-
PS-4476 Merge fb-prod201801
-
- Done
-
- links to