Is it mandatory to have same code version on the MM and MD controllers which has 8.x code?
It's NOT mandatory to have same code version running on MM and MD controllers.
However the MM should have higher code (22.214.171.124) and all other MDs can have (126.96.36.199) code. But the controllers which are in Cluster members should have the same code version. Only then Cluster hitless failover will happen smoothly.