Bug #110888 checkInstanceConfiguration and docs disagree on binlog_transaction_dependency_tr
Submitted: 2 May 2023 18:51 Modified: 31 Jul 2023 15:35
Reporter: Marcos Albe (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0.31 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[2 May 2023 18:51] Marcos Albe
Description:
We want to set binlog_transaction_dependency_tracking=WRITESET_SESSION and in https://dev.mysql.com/doc/refman/8.0/en/group-replication-requirements.html we can read:

Binary Log Dependency Tracking.  Setting binlog_transaction_dependency_tracking=WRITESET_SESSION can improve performance for a group member, depending on the group's workload. Group Replication carries out its own parallelization after certification when applying transactions from the relay log, independently of the value set for binlog_transaction_dependency_tracking. However, the value of binlog_transaction_dependency_tracking does affect how transactions are written to the binary logs on Group Replication members. The dependency information in those logs is used to assist the process of state transfer from a donor's binary log for distributed recovery, which takes place whenever a member joins or rejoins the group.

So everything makes me believe it that it's a valid and sound setting for use with GR/InnoDB Cluster, but when I set it and then run dba.checkInstanceConfiguration() we see:

NOTE: Some configuration options need to be fixed:
+----------------------------------------+------------------+----------------+--------------------+
| Variable                               | Current Value    | Required Value | Note               |
+----------------------------------------+------------------+----------------+--------------------+
| binlog_transaction_dependency_tracking | WRITESET_SESSION | WRITESET       | Restart the server |
+----------------------------------------+------------------+----------------+--------------------+

And I'm unable to see why it would be a requirement and can't find anything in the code indicating why WRITESET_SESSION is not valid too.

Can you please confirm whether the docs are correct and valid, or if I should indeed follow the advise given by dba.checkInstanceConfiguration() ?

Thanks!

How to repeat:
Set WRITESET_SESSION on a node:
STOP GROUP_REPLICATION;
SET GLOBAL binlog_transaction_dependency_tracking=WRITESET_SESSION;
START GROUP_REPLICATION;

Then connect to that node with mysqlsh and run dba.checkInstanceConfiguration()

Suggested fix:
Either update documentation and explain why WRITESET_SESSION is not a valid option, or update dba.checkInstanceConfiguration() related code to consider it a valid option.
[3 May 2023 10:01] MySQL Verification Team
Hello Marcos,

Thank you for the report and feedback.

Thanks,
Umesh
[27 Jul 2023 22:53] Jon Stephens
Hi,

The most important issue is that, where it reads 

> Setting binlog_transaction_dependency_tracking=WRITESET_SESSION can improve 
> performance for a group member...

it should instead read

> Setting binlog_transaction_dependency_tracking=WRITESET can improve 
> performance for a group member...

That is, it should say, "WRITESET" and not "WRITESET_SESSION". This problem is fixed in the MySQL 8.0 and 8.1 Manuals by mysqldoc rev 76352 and will be published to dev.mysql.com shortly.

Keeping this open while taking care of some related issues.
[28 Jul 2023 16:35] Marcos Albe
Indeed, I reckon WRITESET_SESSION will reduce parallelization, but still, in this case is what we needed to use to prevent some conflicts that were popping up; Do you confirm the method is supported? Or..? :)
[28 Jul 2023 19:37] Jon Stephens
Further improvements made in mysqldoc rev 76370, after discussing with Development.

Will hand this over to another writer more familiar with InnoDB Cluster/MySQL Shell for any additional handling if/as needed.

Still in progress.
[31 Jul 2023 15:35] Edward Gilmore
Posted by developer:
 
Relevant Group Replication documentation was updated.
Thank you for the bug report.