Bug #112400 Reading non-readable node
Submitted: 20 Sep 2023 17:18 Modified: 25 Sep 2023 3:55
Reporter: Mikael Ronström Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:8.0.34 OS:Any
Assigned to: CPU Architecture:Any

[20 Sep 2023 17:18] Mikael Ronström
Description:
A cluster with 2 node groups and 4 nodes, each node group has one
node in LocationDomainId=1 and the other node in LocationDomainId=2.
In this case if a transaction is executed by a live node in LocationDomainId=1
and the other node in LocationDomainId=1 is synchronizing, we could for a short
time issue a read against the starting node on a fragment that is currently
being synchronised and thus is non-readable.

How to repeat:
See above, create test case based on it.

Suggested fix:
Add a new parameter to DIGETNODESREQ: only_readable_nodes
Add a flag on fragment specifying when synchronizing is ongoing
(set with UPDATE_FRAG_STATEREQ(STORED) and reset by
UPDATE_FRAG_STATEREQ(COMMIT_STORED)).
If only_readable_nodes && synch_ongoing && node is activeNodes[1] then don't use node in result from DIGETNODESREQ.
[25 Sep 2023 3:55] MySQL Verification Team
Hello Mikael,

Thank you for the report and feedback.

Sincerely,
Umesh