Bug #117675 Support zstd compression
Submitted: 12 Mar 8:02 Modified: 12 Mar 8:35
Reporter: Kento Takeuchi (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Clone Plugin Severity:S4 (Feature request)
Version:8.4.4 OS:Linux
Assigned to: CPU Architecture:x86
Tags: Contribution

[12 Mar 8:02] Kento Takeuchi
Description:
This is a feature request.

Currently, the clone plugin supports Legacy Connection Compression.
As a result, it is not possible to use Connection Compression with zstd.
Legacy Connection Compression has been deprecated since version 8.0.18, so I would like to support the new Connection Compression and enable the use of zstd compression.
https://dev.mysql.com/doc/refman/8.4/en/connection-compression-control.html

I will send you the patch.
The following settings are added in the patch to enable the new Connection Compression.

- clone_compression_algorithms
  - By default, uncompressed is set, and if clone_enable_compression = true, Legacy Connection Compression is prioritized.
  - ex) clone_compression_algorithms='zstd,zlib,uncompressed'

- clone_zstd_compression_level
  - The default is 3, and values can be set in the range from 1 to 22.
  - ex) clone_zstd_compression_level=3

I have confirmed that this patch works with 8.4.4.

How to repeat:
This is a feature request.

Suggested fix:
Implement the system variables described in the Description into the clone plugin.
Use the MySQL C API to set the current system variables values together with MYSQL_OPT_COMPRESSION_ALGORITHMS/MYSQL_OPT_ZSTD_COMPRESSION_LEVEL in mysql_options.
[12 Mar 8:05] Kento Takeuchi
This is a patch to enable zstd compression in the Clone plugin

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: clone-plugin.patch (application/octet-stream, text), 8.02 KiB.

[12 Mar 8:14] Kento Takeuchi
This is a patch to verify this patch with mtr.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: clone-plugin-mtr.patch (application/octet-stream, text), 21.86 KiB.

[12 Mar 8:35] MySQL Verification Team
Hello Kento Takeuchi,

Thank you for the feature request and contribution.

regards,
Umesh