Details
Description
ReplicaState enum is using ordinal to conduct serialization and deserialization, which is vulnerable to the order, to cause issues similar to HDFS-15624.
To avoid it, either adding comments to let later developer not to change this enum, or add index checking in the read and getState function to avoid index out of bound error.