Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16007

Deserialization of ReplicaState should avoid throwing ArrayIndexOutOfBoundsException

    XMLWordPrintableJSON

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.

      Attachments

        Activity

          People

            vjasani Viraj Jasani
            jwjwyoung junwen yang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h